Esempio n. 1
0
 def test_subject_length(self):
     """ Test that zero-length subject raises exception """
     with self.assertRaises(Exception):
         CourseVal.subject("")
Esempio n. 2
0
 def test_subject(self):
     """ Test that valid subject does not raise exception """
     try:
         CourseVal.subject("test")
     except Exception:
         self.fail()
Esempio n. 3
0
 def test_subject_invalid_type(self):
     """ Test that non-string subject raises exception """
     with self.assertRaises(Exception):
         CourseVal.subject(1234)