예제 #1
0
 def test_departments_invalid_type(self):
     """ Test that invalid type raises exception """
     with self.assertRaises(Exception):
         CourseVal.departments(1234)
     with self.assertRaises(Exception):
         CourseVal.departments([1234])
     with self.assertRaises(Exception):
         CourseVal.departments([""])
예제 #2
0
 def test_departments_length(self):
     """ Test that zero-length raises exception """
     with self.assertRaises(Exception):
         CourseVal.departments([])
예제 #3
0
 def test_departments(self):
     """ Test that valid args does not raise exception """
     try:
         CourseVal.departments(["test"])
     except Exception:
         self.fail()