Merge "trivial: Test object backporting against correct version"

This commit is contained in:
Zuul 2020-07-24 09:44:25 +00:00 committed by Gerrit Code Review
commit 4a925cf01a
1 changed files with 2 additions and 2 deletions

View File

@ -412,7 +412,7 @@ class TestImageMetaProps(test.NoDBTestCase):
self.assertIn('hw_pmu', primitive['nova_object.data'])
self.assertNotIn('hw_pmu', old_primitive['nova_object.data'])
def test_obj_make_compatible_1_26(self):
def test_obj_make_compatible_vtpm(self):
"""Test that checks if we pop hw_tpm_model and hw_tpm_version."""
obj = objects.ImageMetaProps(
hw_tpm_model='tpm-tis', hw_tpm_version='1.2',
@ -421,6 +421,6 @@ class TestImageMetaProps(test.NoDBTestCase):
self.assertIn('hw_tpm_model', primitive['nova_object.data'])
self.assertIn('hw_tpm_version', primitive['nova_object.data'])
primitive = obj.obj_to_primitive('1.25')
primitive = obj.obj_to_primitive('1.26')
self.assertNotIn('hw_tpm_model', primitive['nova_object.data'])
self.assertNotIn('hw_tpm_version', primitive['nova_object.data'])