Drop all tables of db after each test

This commit is contained in:
Stefan Wehrmeyer 2014-01-31 18:56:58 +01:00
parent 2865e7c50e
commit 7a6b16931c

View File

@ -19,6 +19,10 @@ class DatabaseTestCase(unittest.TestCase):
for row in TEST_DATA:
self.tbl.insert(row)
def tearDown(self):
for table in self.db.tables:
self.db[table].drop()
def test_valid_database_url(self):
assert self.db.url, os.environ['DATABASE_URL']