Merge "Do not patch inspect.argspec directly"

This commit is contained in:
Zuul 2021-08-10 14:33:53 +00:00 committed by Gerrit Code Review
commit 7e1f008256

View File

@ -584,7 +584,7 @@ class TestObjectVersionChecker(test.TestCase):
argspec = 'cubone'
self._add_class(self.obj_classes, ExtraDataObj)
with mock.patch('inspect.getargspec') as mock_gas:
with mock.patch.object(fixture, 'get_method_spec') as mock_gas:
mock_gas.return_value = argspec
fp = self.ovc._get_fingerprint(ExtraDataObj.__name__,
extra_data_func=get_data)