Exemple #1
0
 def ToJson(self):
     return json.dumps({
         'Name': self.Name,
         'StateClassName': self.StateClassName,
         'StartTime': Utils.TimeToString(self.StartTime),
         'EndTime': Utils.TimeToString(self.EndTime),
     })
Exemple #2
0
 def test_SpecifyThatTimeCanBeConvertedToString(self):
     timeObject = datetime.time(6, 15)
     self.assertEqual(type(Utils.TimeToString(timeObject)), type('string'))
     self.assertEqual(Utils.TimeToString(timeObject), "06:15")