def test_SpecifyThatTimeCanBeCreatedFromString(self): timeString = "06:15" self.assertEqual(type(Utils.TimeFromString(timeString)), datetime.time) self.assertEqual(Utils.TimeFromString(timeString), datetime.time(6, 15))
def FromDict(data): return Event(name=data['Name'], stateClassName=data['StateClassName'], startTime=Utils.TimeFromString(data['StartTime']), endTime=Utils.TimeFromString(data['EndTime']))