Removing the MockAutospecFixture() entirely works around this issue. Maybe it's not actually needed? If it is needed, I think each individual mock.Mock and mock.MagicMock needs to be inspected to ensure they are not autospec-ing Mock objects.
+--- a/networking_hyperv/tests/base.py ++++ b/networking_hyperv/tests/base.py +@@ -50,7 +50,6 @@ + + def setUp(self): + super(BaseTestCase, self).setUp() +- self.useFixture(mock_fixture.MockAutospecFixture()) + self._patch_autospec_classes() + + self.addCleanup(CONF.reset)
Removing the MockAutospecFix ture() entirely works around this issue. Maybe it's not actually needed? If it is needed, I think each individual mock.Mock and mock.MagicMock needs to be inspected to ensure they are not autospec-ing Mock objects.
+--- a/networking_ hyperv/ tests/base. py hyperv/ tests/base. py (mock_fixture. MockAutospecFix ture()) autospec_ classes( ) (CONF.reset)
++++ b/networking_
+@@ -50,7 +50,6 @@
+
+ def setUp(self):
+ super(BaseTestCase, self).setUp()
+- self.useFixture
+ self._patch_
+
+ self.addCleanup