From e9ab3f31504a176f483c8340b3ad2ba7679fe285 Mon Sep 17 00:00:00 2001 From: Abhilash Raj Date: Wed, 24 Sep 2014 23:13:12 +0530 Subject: added support for migrations via alembic --- src/mailman/testing/layers.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/mailman/testing') diff --git a/src/mailman/testing/layers.py b/src/mailman/testing/layers.py index eb51e309f..3d2a50782 100644 --- a/src/mailman/testing/layers.py +++ b/src/mailman/testing/layers.py @@ -190,6 +190,10 @@ class ConfigLayer(MockAndMonkeyLayer): @classmethod def tearDown(cls): assert cls.var_dir is not None, 'Layer not set up' + # Reset the test database after the tests are done so that there + # is no data incase the tests are rerun with a database layer like + # mysql or postgresql which are not deleted in teardown. + reset_the_world() config.pop('test config') shutil.rmtree(cls.var_dir) cls.var_dir = None -- cgit v1.2.3-70-g09d2