import unittest

from onlinejudge._implementation import main


class RequestExceptionTest(unittest.TestCase):
    def test_invalid_url(self):
        with self.assertRaises(SystemExit) as e:
            main.main(["d", "http://invalid_contest"])
        self.assertEqual(e.exception.code, 1)

add test for main