summaryrefslogtreecommitdiffstats
path: root/nova/test.py
diff options
context:
space:
mode:
authorandy <github@anarkystic.com>2010-09-08 19:57:29 +0200
committerandy <github@anarkystic.com>2010-09-08 19:57:29 +0200
commit9df460a5cb2de96133028949ad12ac7c16dbd7fc (patch)
treefb7e62037f1602facdb9dbc97433def3e4499eae /nova/test.py
parent30cec546812799fba09a2bab2b3aa4aad712ae3c (diff)
downloadnova-9df460a5cb2de96133028949ad12ac7c16dbd7fc.tar.gz
nova-9df460a5cb2de96133028949ad12ac7c16dbd7fc.tar.xz
nova-9df460a5cb2de96133028949ad12ac7c16dbd7fc.zip
Remove tornado-related code from almost everything.
Left it in api where it is still being used pending gundlach's changes.
Diffstat (limited to 'nova/test.py')
-rw-r--r--nova/test.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/nova/test.py b/nova/test.py
index c392c8a84..5380d5743 100644
--- a/nova/test.py
+++ b/nova/test.py
@@ -62,6 +62,7 @@ class TrialTestCase(unittest.TestCase):
self.mox = mox.Mox()
self.stubs = stubout.StubOutForTesting()
self.flag_overrides = {}
+ self.injected = []
def tearDown(self): # pylint: disable-msg=C0103
"""Runs after each test method to finalize/tear down test environment"""
@@ -72,6 +73,9 @@ class TrialTestCase(unittest.TestCase):
self.stubs.SmartUnsetAll()
self.mox.VerifyAll()
+ for x in self.injected:
+ x.stop()
+
if FLAGS.fake_rabbit:
fakerabbit.reset_all()
@@ -99,7 +103,6 @@ class BaseTestCase(TrialTestCase):
super(BaseTestCase, self).setUp()
# TODO(termie): we could possibly keep a more global registry of
# the injected listeners... this is fine for now though
- self.injected = []
self.ioloop = ioloop.IOLoop.instance()
self._waiting = None
@@ -109,8 +112,6 @@ class BaseTestCase(TrialTestCase):
def tearDown(self):# pylint: disable-msg=C0103
"""Runs after each test method to finalize/tear down test environment"""
super(BaseTestCase, self).tearDown()
- for x in self.injected:
- x.stop()
if FLAGS.fake_rabbit:
fakerabbit.reset_all()