diff --git a/oslo_versionedobjects/test.py b/oslo_versionedobjects/test.py index 32bc86f6..4589e018 100644 --- a/oslo_versionedobjects/test.py +++ b/oslo_versionedobjects/test.py @@ -178,8 +178,8 @@ class TestCase(testtools.TestCase): baseclass) for name in sorted(implmethods.keys()): - baseargs = inspect.getargspec(basemethods[name]) - implargs = inspect.getargspec(implmethods[name]) + baseargs = inspect.getfullargspec(basemethods[name]) + implargs = inspect.getfullargspec(implmethods[name]) self.assertEqual(baseargs, implargs, "%s args don't match base class %s" % diff --git a/oslo_versionedobjects/tests/test_fixture.py b/oslo_versionedobjects/tests/test_fixture.py index b22f4417..f43d4df2 100644 --- a/oslo_versionedobjects/tests/test_fixture.py +++ b/oslo_versionedobjects/tests/test_fixture.py @@ -757,9 +757,11 @@ class TestMethodSpec(test.TestCase): self._test_method3 = test_method3 def test_method_spec_compat(self): - self.assertEqual(inspect.getargspec(self._test_method1), + self.assertEqual(inspect.ArgSpec(args=['a', 'b', 'kw1'], varargs=None, + keywords='kwargs', defaults=(123,)), fixture.get_method_spec(self._test_method1)) - self.assertEqual(inspect.getargspec(self._test_method2), + self.assertEqual(inspect.ArgSpec(args=['a', 'b'], varargs='args', + keywords=None, defaults=None), fixture.get_method_spec(self._test_method2)) self.assertEqual(inspect.getfullargspec(self._test_method3), fixture.get_method_spec(self._test_method3))