Commit 63cdc148 authored by Takashi Kajinami's avatar Takashi Kajinami
Browse files

Do not patch inspect.argspec directly

This fixes the leftover of c1933306
and makes the get_method_spec method patched instead of inspect.argspec
because now the method wraps call to inspect.argspec.

Change-Id: Id3c18d151a6f239f7ceff4e0b24f4006963827ea
parent 4d5d360d
......@@ -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)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment