コード例 #1
0
 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)
コード例 #2
0
ファイル: test_glance.py プロジェクト: tomzo/nova
 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)