def test_Course12(self): co = Course("CS-337", "004", ["M", "W"], "11:00", "11:50", ["001", "002", "003"]) with self.assertRaises(ValueError) as ctx: co.end_time = "23:000" self.assertEqual("valid end 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_Course10(self): co = Course("CS-337", "004", ["M", "W"], "11:00", "11:50", ["001", "002", "003"]) co.end_time = "11:00" self.assertEqual(co.end_time, "11:00")