Flush redis db in setup and teardown of tests.

This commit is contained in:
Joshua McKenty
2010-06-24 04:11:55 +01:00
committed by andy
parent 97571b5afe
commit fbb666eef6
6 changed files with 10 additions and 10 deletions

View File

@@ -103,6 +103,9 @@ class BaseTestCase(TrialTestCase):
self._waiting = None
self._doneWaiting = False
self._timedOut = False
self.flags(redis_db=8)
r = datastore.Redis.instance()
r.flushdb()
self.set_up()
def set_up(self):
@@ -118,6 +121,8 @@ class BaseTestCase(TrialTestCase):
if FLAGS.fake_rabbit:
fakerabbit.reset_all()
self.tear_down()
r = datastore.Redis.instance()
r.flushdb()
def _waitForTest(self, timeout=60):
""" Push the ioloop along to wait for our test to complete. """