Ejemplo n.º 1
0
 def test_dt_deserializer(self):
     dt = timeutils.parse_isotime('1955-11-05T00:00:00Z')
     self.assertEqual(utils.dt_deserializer(None, timeutils.isotime(dt)),
                      dt)
     self.assertEqual(utils.dt_deserializer(None, None), None)
     self.assertRaises(ValueError, utils.dt_deserializer, None, 'foo')
Ejemplo n.º 2
0
 def test_dt_deserializer(self):
     dt = timeutils.parse_isotime("1955-11-05T00:00:00Z")
     self.assertEqual(utils.dt_deserializer(None, timeutils.isotime(dt)), dt)
     self.assertIsNone(utils.dt_deserializer(None, None))
     self.assertRaises(ValueError, utils.dt_deserializer, None, "foo")