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