Skip to content

Commit

Permalink
Remove the TestRemoteObject class
Browse files Browse the repository at this point in the history
This class is now testing only things that exist (and are tested) in
oslo.versionedobjects. Remove this class from what we test in nova.

Conflicts:
	nova/tests/unit/objects/test_objects.py

Change-Id: I2e64f5917fb83eaa29970388359ef29db44f0e0b
(cherry picked from commit bca5c1f)
  • Loading branch information
kk7ds authored and Matt Riedemann committed Dec 21, 2015
1 parent 94d6b69 commit 1a688e3
Showing 1 changed file with 0 additions and 36 deletions.
36 changes: 0 additions & 36 deletions nova/tests/unit/objects/test_objects.py
Expand Up @@ -911,42 +911,6 @@ def test_set_defaults_not_overwrite(self):
self.assertTrue(obj.deleted)


class TestRemoteObject(_RemoteTest, _TestObject):
@mock.patch('oslo_versionedobjects.base.obj_tree_get_versions')
def test_major_version_mismatch(self, mock_otgv):
mock_otgv.return_value = {
'MyObj': '2.0',
}
self.assertRaises(ovo_exc.IncompatibleObjectVersion,
MyObj2.query, self.context)

@mock.patch('oslo_versionedobjects.base.obj_tree_get_versions')
def test_minor_version_greater(self, mock_otgv):
mock_otgv.return_value = {
'MyObj': '1.7',
}
self.assertRaises(ovo_exc.IncompatibleObjectVersion,
MyObj2.query, self.context)

def test_minor_version_less(self):
MyObj2.VERSION = '1.2'
obj = MyObj2.query(self.context)
self.assertEqual(obj.bar, 'bar')

@mock.patch('oslo_versionedobjects.base.obj_tree_get_versions')
def test_compat(self, mock_otgv):
mock_otgv.return_value = {
'MyObj': '1.1',
}
obj = MyObj2.query(self.context)
self.assertEqual('oldbar', obj.bar)

def test_revision_ignored(self):
MyObj2.VERSION = '1.1.456'
obj = MyObj2.query(self.context)
self.assertEqual('bar', obj.bar)


class TestObjectSerializer(_BaseTestCase):
def test_serialize_entity_primitive(self):
ser = base.NovaObjectSerializer()
Expand Down

0 comments on commit 1a688e3

Please sign in to comment.