Merge "Drop mox usage"
This commit is contained in:
commit
ff11fa0785
@ -15,26 +15,9 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
import fixtures
|
import fixtures
|
||||||
import mox
|
|
||||||
import stubout
|
|
||||||
import testtools
|
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)
|
|
||||||
|
|
||||||
|
|
||||||
class TestCase(testtools.TestCase):
|
class TestCase(testtools.TestCase):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
@ -47,7 +30,3 @@ class TestCase(testtools.TestCase):
|
|||||||
os.environ.get('OS_STDERR_CAPTURE') == '1'):
|
os.environ.get('OS_STDERR_CAPTURE') == '1'):
|
||||||
stderr = self.useFixture(fixtures.StringStream('stderr')).stream
|
stderr = self.useFixture(fixtures.StringStream('stderr')).stream
|
||||||
self.useFixture(fixtures.MonkeyPatch('sys.stderr', stderr))
|
self.useFixture(fixtures.MonkeyPatch('sys.stderr', stderr))
|
||||||
|
|
||||||
mox_fixture = self.useFixture(MoxStubout())
|
|
||||||
self.mox = mox_fixture.mox
|
|
||||||
self.stubs = mox_fixture.stubs
|
|
||||||
|
@ -7,5 +7,4 @@ oslo.sphinx
|
|||||||
testrepository>=0.0.17
|
testrepository>=0.0.17
|
||||||
testscenarios>=0.4
|
testscenarios>=0.4
|
||||||
testtools>=0.9.36,!=1.2.0
|
testtools>=0.9.36,!=1.2.0
|
||||||
mox>=0.5.3
|
|
||||||
mock>=1.0
|
mock>=1.0
|
||||||
|
Loading…
Reference in New Issue
Block a user