Cleanup callbacks are run in reverse order so all stubs unsetting
should be added at the end of the cleanup list.
Fixes bug
1185004
Change-Id: I5ad3ea2cdce663aaeae6b7cc2cb9c5dac9d12435
# because it screws with our generators
self.mox = mox.Mox()
self.stubs = stubout.StubOutForTesting()
+ self.addCleanup(FLAGS.reset)
self.addCleanup(self.mox.UnsetStubs)
self.addCleanup(self.stubs.UnsetAll)
self.addCleanup(self.stubs.SmartUnsetAll)
self.injected = []
self._services = []
FLAGS.set_override('fatal_exception_format_errors', True)
- self.addCleanup(FLAGS.reset)
def tearDown(self):
"""Runs after each test method to tear down test environment."""