diff options
author | Jenkins <jenkins@review.openstack.org> | 2013-01-28 07:55:57 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2013-01-28 07:55:57 +0000 |
commit | 983382c5b9d64d902eb570780df341ea3aa9a83e (patch) | |
tree | a76c8aad6edb5a5606fa11a8da80853e3985e19e /tests/utils.py | |
parent | 0eeeb6f57a01adc6dc1e17339ba6591d0e2dee1b (diff) | |
parent | 827547a0b3da411441bf691ddbc94867001a3311 (diff) | |
download | oslo-983382c5b9d64d902eb570780df341ea3aa9a83e.tar.gz oslo-983382c5b9d64d902eb570780df341ea3aa9a83e.tar.xz oslo-983382c5b9d64d902eb570780df341ea3aa9a83e.zip |
Merge "Use testtools as test base class."
Diffstat (limited to 'tests/utils.py')
-rw-r--r-- | tests/utils.py | 14 |
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): """ |