Пример #1
0
 def test_not_in_config(self):
     self.assertIsNone(
         self.commute_api.check_commute_time(
             mock_request('13 Xd, Center, Dublin 3')))
     self.assertIsNone(
         self.commute_api.check_commute_time(
             mock_request('Red Line, Watch Yourself, Dublin 7')))
Пример #2
0
 def test_unknown(self):
     self.assertIsNone(
         self.commute_api.check_commute_time(
             mock_request('12 Ave, Monkstown, Co. Dublin')))
     self.assertIsNone(
         self.commute_api.check_commute_time(
             mock_request('12 Sea, Bray, Co. Wicklow')))
Пример #3
0
 def test_grab_first_group(self):
     self.assertEqual(
         self.commute_api.check_commute_time(
             mock_request('Doblin 18, Dublin 1, Dublin 6')), 50)
     self.assertEqual(
         self.commute_api.check_commute_time(
             mock_request('Somewhere in Dublin 16, Dublin 1')), 23)
     self.assertEqual(
         self.commute_api.check_commute_time(
             mock_request('Dublin 18, D18XC72, Dublin 6w')), 5)
Пример #4
0
 def test_in_config(self):
     self.assertEqual(
         self.commute_api.check_commute_time(
             mock_request('Doblin 18, Dublin 1')), 50)
     self.assertEqual(
         self.commute_api.check_commute_time(
             mock_request('Somewhere in Dublin 16')), 23)
     self.assertEqual(
         self.commute_api.check_commute_time(
             mock_request('Dublin 18, D18XC72')), 5)
Пример #5
0
 def test_6_and_6w(self):
     self.assertEqual(
         self.commute_api.check_commute_time(
             mock_request('Doblin 18, Dublin 6')), 40)
     self.assertEqual(
         self.commute_api.check_commute_time(
             mock_request('Somewhere in Dublin 6W')), 45)
     self.assertEqual(
         self.commute_api.check_commute_time(
             mock_request('Somewhere in dublin 6w')), 45)
     self.assertEqual(
         self.commute_api.check_commute_time(mock_request('Dublin 6 w')),
         40)