Exemplo n.º 1
0
 def test_code_invalid_type(self):
     """ Test that invalid type raises exception """
     with self.assertRaises(Exception):
         CourseVal.code(1234)
Exemplo n.º 2
0
 def test_code_length(self):
     """ Test that zero-length raises exception """
     with self.assertRaises(Exception):
         CourseVal.code("")
Exemplo n.º 3
0
 def test_code(self):
     """ Test that valid args does not raise exception """
     try:
         CourseVal.code("test")
     except Exception:
         self.fail()