A mirror of dcurooms found at https://github.com/theycallmemac/dcurooms
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
510 B

  1. import unittest
  2. import sys
  3. import requests
  4. sys.path.append('.')
  5. from scripts.dcurooms import build_timetable
  6. class BuildTimetableTestCase(unittest.TestCase):
  7. def test_return_val(self):
  8. val = build_timetable("CG04", "24", "14", "4")
  9. self.assertEqual(type(val), tuple)
  10. def test_url_builder(self):
  11. tt, url = build_timetable("LG26", "4", "10", "1")
  12. info = requests.get(url)
  13. self.assertTrue('200', info.status_code)
  14. if __name__ == '__main__':
  15. unittest.main()