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