Switch base unit test class to oslo mox fixture
This commit just removes the duplicate mox fixture created in
tempest.tests.base and instead uses the MoxStubout fixture from oslo.
Change-Id: I88e8aee86bba4a5ab458c57cb23cb0422f760733
diff --git a/tempest/tests/base.py b/tempest/tests/base.py
index 12c1c25..ba83cf4 100644
--- a/tempest/tests/base.py
+++ b/tempest/tests/base.py
@@ -17,24 +17,9 @@
import os
import fixtures
-import mox
-import stubout
import testtools
-
-class MoxStubout(fixtures.Fixture):
- """Deal with code around mox and stubout as a fixture."""
-
- def setUp(self):
- super(MoxStubout, self).setUp()
- # emulate some of the mox stuff, we can't use the metaclass
- # because it screws with our generators
- self.mox = mox.Mox()
- self.stubs = stubout.StubOutForTesting()
- self.addCleanup(self.stubs.UnsetAll)
- self.addCleanup(self.stubs.SmartUnsetAll)
- self.addCleanup(self.mox.UnsetStubs)
- self.addCleanup(self.mox.VerifyAll)
+from tempest.openstack.common.fixture import moxstubout
class TestCase(testtools.TestCase):
@@ -50,6 +35,6 @@
stderr = self.useFixture(fixtures.StringStream('stderr')).stream
self.useFixture(fixtures.MonkeyPatch('sys.stderr', stderr))
- mox_fixture = self.useFixture(MoxStubout())
+ mox_fixture = self.useFixture(moxstubout.MoxStubout())
self.mox = mox_fixture.mox
self.stubs = mox_fixture.stubs