Example #1
0
 def test_json_out_date(self):
     inpt = LiteralInput(
         identifier="date",
         mode=2,
         data_type='date')
     inpt.data = "2017-04-20"
     out = inpt.json
     self.assertEqual(out['data'], datetime.date(2017, 4, 20), 'date set')
Example #2
0
 def test_json_out_time(self):
     inpt = LiteralInput(
         identifier="time",
         mode=2,
         data_type='time')
     inpt.data = "12:30:00"
     out = inpt.json
     self.assertEqual(out['data'], datetime.time(12, 30, 0), 'time set')