コード例 #1
0
 def test_name_invalid_type(self):
     """ Test that invalid type raises exception """
     with self.assertRaises(Exception):
         CourseVal.name(1234)
コード例 #2
0
 def test_name_length(self):
     """ Test that zero-length raises exception """
     with self.assertRaises(Exception):
         CourseVal.name("")
コード例 #3
0
 def test_name(self):
     """ Test that valid args does not raise exception """
     try:
         CourseVal.name("test")
     except Exception:
         self.fail()