def test_get_tournament_id_from_url(self):
     self.assertEquals(ChallongeScraper.get_tournament_id_from_url(TOURNAMENT_URL_1), 'faketournament')
     self.assertEquals(ChallongeScraper.get_tournament_id_from_url(TOURNAMENT_URL_2), 'TWL7')
     self.assertEquals(ChallongeScraper.get_tournament_id_from_url(TOURNAMENT_URL_3),
             'jerseyjapes-jj109meleesingles')
     self.assertEquals(ChallongeScraper.get_tournament_id_from_url(TOURNAMENT_URL_4), 'tdml46')
     self.assertEquals(ChallongeScraper.get_tournament_id_from_url(TOURNAMENT_URL_5),
             'vgbootcamp-f117ijy1')
Beispiel #2
0
 def test_get_tournament_id_from_url(self):
     self.assertEquals(
         ChallongeScraper.get_tournament_id_from_url(TOURNAMENT_URL_1),
         'faketournament')
     self.assertEquals(
         ChallongeScraper.get_tournament_id_from_url(TOURNAMENT_URL_2),
         'TWL7')
     self.assertEquals(
         ChallongeScraper.get_tournament_id_from_url(TOURNAMENT_URL_3),
         'jerseyjapes-jj109meleesingles')
     self.assertEquals(
         ChallongeScraper.get_tournament_id_from_url(TOURNAMENT_URL_4),
         'tdml46')
     self.assertEquals(
         ChallongeScraper.get_tournament_id_from_url(TOURNAMENT_URL_5),
         'vgbootcamp-f117ijy1')
 def test_get_tournament_id_from_invalid_url(self):
     with self.assertRaises(ValueError):
         ChallongeScraper.get_tournament_id_from_url(INVALID_TOURNAMENT_URL_1)
     with self.assertRaises(ValueError):
         ChallongeScraper.get_tournament_id_from_url(INVALID_TOURNAMENT_URL_2)
     with self.assertRaises(ValueError):
         ChallongeScraper.get_tournament_id_from_url(INVALID_TOURNAMENT_URL_3)
Beispiel #4
0
 def test_get_tournament_id_from_invalid_url(self):
     with self.assertRaises(ValueError):
         ChallongeScraper.get_tournament_id_from_url(
             INVALID_TOURNAMENT_URL_1)
     with self.assertRaises(ValueError):
         ChallongeScraper.get_tournament_id_from_url(
             INVALID_TOURNAMENT_URL_2)
     with self.assertRaises(ValueError):
         ChallongeScraper.get_tournament_id_from_url(
             INVALID_TOURNAMENT_URL_3)