def test_restrictions_invalid_type(self): """ Test that invalid type raises exception """ with self.assertRaises(Exception): CourseVal.restrictions(1234) with self.assertRaises(Exception): CourseVal.restrictions([1234]) with self.assertRaises(Exception): CourseVal.restrictions([""]) with self.assertRaises(Exception): CourseVal.restrictions([])
def test_restrictions(self): """ Test that valid args does not raise exception """ try: CourseVal.restrictions(["test"]) except Exception: self.fail()