def test_Course9(self): co = Course("CS-337", "004", ["M", "W"], "11:00", "11:50", ["001", "002", "003"]) with self.assertRaises(ValueError) as ctx: co.start_time = "23:000" self.assertEqual("valid start time is 00:00 to 23:59", str(ctx.exception))
def test_Course13(self): co = Course("CS-337", "004", ["M", "W"], "11:00", "11:50", ["001", "002", "003"]) co.start_time = "11:00" with self.assertRaises(ValueError) as ctx: co.end_time = "10:00" self.assertEqual("end time can not be earlier than start time", str(ctx.exception))
def test_Course7(self): co = Course("CS-337", "004", ["M", "W"], "11:00", "11:50", ["001", "002", "003"]) co.start_time = "11:00" self.assertEqual(co.start_time, "11:00")