Esempio n. 1
0
 def test_semesters_offered_invalid_type(self):
     """ Test that invalid type raises exception """
     with self.assertRaises(Exception):
         CourseVal.semesters_offered(1234)
     with self.assertRaises(Exception):
         CourseVal.semesters_offered([1234])
     with self.assertRaises(Exception):
         CourseVal.semesters_offered([""])
Esempio n. 2
0
 def test_semesters_offered_length(self):
     """ Test that zero-length raises exception """
     with self.assertRaises(Exception):
         CourseVal.semesters_offered([])
Esempio n. 3
0
 def test_semesters_offered(self):
     """ Test that valid args does not raise exception """
     try:
         CourseVal.semesters_offered([SemesterOffered.W])
     except Exception:
         self.fail()