summaryrefslogtreecommitdiffstats
path: root/tests/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/utils.py')
-rw-r--r--tests/utils.py14
1 files changed, 5 insertions, 9 deletions
diff --git a/tests/utils.py b/tests/utils.py
index 883e5f6..2cbcd5b 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -19,24 +19,20 @@
import stubout
import subprocess
-import unittest
+import testtools
from openstack.common import cfg
+from openstack.common.fixture import moxstubout
CONF = cfg.CONF
-class BaseTestCase(unittest.TestCase):
+class BaseTestCase(testtools.TestCase):
def setUp(self):
super(BaseTestCase, self).setUp()
- self.stubs = stubout.StubOutForTesting()
-
- def tearDown(self):
- super(BaseTestCase, self).tearDown()
- CONF.reset()
- self.stubs.UnsetAll()
- self.stubs.SmartUnsetAll()
+ self.stubs = self.useFixture(moxstubout.MoxStubout()).stubs
+ self.addCleanup(CONF.reset)
def config(self, **kw):
"""