def test_convert_timestamps_to_datetimes(self): fixture = {'name': None, 'properties': {}, 'status': None, 'is_public': None, 'created_at': NOW_GLANCE_FORMAT, 'updated_at': NOW_GLANCE_FORMAT, 'deleted_at': NOW_GLANCE_FORMAT} result = glance._convert_timestamps_to_datetimes(fixture) self.assertEqual(result['created_at'], NOW_DATETIME) self.assertEqual(result['updated_at'], NOW_DATETIME) self.assertEqual(result['deleted_at'], NOW_DATETIME)
def test_convert_timestamps_to_datetimes(self): fixture = { "name": None, "properties": {}, "status": None, "is_public": None, "created_at": NOW_GLANCE_FORMAT, "updated_at": NOW_GLANCE_FORMAT, "deleted_at": NOW_GLANCE_FORMAT, } result = glance._convert_timestamps_to_datetimes(fixture) self.assertEqual(result["created_at"], NOW_DATETIME) self.assertEqual(result["updated_at"], NOW_DATETIME) self.assertEqual(result["deleted_at"], NOW_DATETIME)