diff options
author | Mark McLoughlin <markmc@redhat.com> | 2013-05-20 13:14:32 +0100 |
---|---|---|
committer | Mark McLoughlin <markmc@redhat.com> | 2013-05-20 13:46:14 +0100 |
commit | ba849efe75f9ca267e03ca22e8647f140bbaaf66 (patch) | |
tree | eb81f4428540f1ab5feeafae3da72f5c748796c2 /tests/utils.py | |
parent | 2d579dd3f311d3c5cb9aa1658d81488bb526b09c (diff) | |
download | oslo-ba849efe75f9ca267e03ca22e8647f140bbaaf66.tar.gz oslo-ba849efe75f9ca267e03ca22e8647f140bbaaf66.tar.xz oslo-ba849efe75f9ca267e03ca22e8647f140bbaaf66.zip |
Use mox object from moxstubout fixture
The moxstubout fixture creates a mox object which we can re-use in
tests.
It also ensures verify() is called, which it clearly wasn't in the
case of the qpid tests.
Change-Id: Ibf3326f18b160865012d40a5841b65438262c4df
Diffstat (limited to 'tests/utils.py')
-rw-r--r-- | tests/utils.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/utils.py b/tests/utils.py index c5c7c00..a23dd75 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -31,7 +31,9 @@ class BaseTestCase(testtools.TestCase): def setUp(self): super(BaseTestCase, self).setUp() - self.stubs = self.useFixture(moxstubout.MoxStubout()).stubs + moxfixture = self.useFixture(moxstubout.MoxStubout()) + self.mox = moxfixture.mox + self.stubs = moxfixture.stubs self.addCleanup(CONF.reset) self.useFixture(fixtures.FakeLogger('openstack.common')) self.useFixture(fixtures.Timeout(30, True)) |