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')
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")