Example #1
0
 def test_datetime_conversion_idempotence(self):
     result = DateTime.convert(self.now)
     self.assertIsInstance(result, DateTime)
     self.assertEqual(self.now, result)
Example #2
0
 def setUp(self):
     self.now = DateTime.utcnow()
     self.epoch = DateTime(1970, 1, 1)
Example #3
0
 def test_datetime_conversion(self):
     dtime = datetime.utcnow()
     new_dtime = DateTime.convert(dtime)
     self.assertIsInstance(new_dtime, DateTime)