Skip to content

Commit

Permalink
online-judge-tools#538: For test coverage.
Browse files Browse the repository at this point in the history
  • Loading branch information
fukatani committed Oct 16, 2019
1 parent 3f2d39d commit 0012db4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/dispatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def test_contest_from_url(self):
def test_service_from_url(self):
service1 = dispatch.service_from_url('https://atcoder.jp/')
self.assertTrue(isinstance(service1, service.atcoder.AtCoderService))
self.assertEqual(service1.get_name(), 'AtCoder')
self.assertEqual(service1.get_url_of_login_page(), 'https://atcoder.jp/login')
self.assertEqual(service1.get_user_history_url(22), 'https://atcoder.jp/users/22/history/json')

Expand All @@ -45,9 +46,11 @@ def test_contest_from_url(self):
contest = dispatch.contest_from_url('https://codeforces.com/contest/1244')
self.assertTrue(isinstance(contest, service.codeforces.CodeforcesContest))
self.assertTrue(isinstance(contest.get_service(), service.codeforces.CodeforcesService))
self.assertEqual(contest.get_url(), 'https://codeforces.com/contest/1244')

def test_service_from_url(self):
service1 = dispatch.service_from_url('https://codeforces.com/')
self.assertEqual(service1.get_name(), 'Codeforces')
self.assertTrue(isinstance(service1, service.codeforces.CodeforcesService))
self.assertEqual(service1.get_url_of_login_page(), 'https://codeforces.com/enter')

Expand Down

0 comments on commit 0012db4

Please sign in to comment.