summaryrefslogtreecommitdiff
path: root/src/mailman/testing/layers.py
diff options
context:
space:
mode:
authorAbhilash Raj2014-09-24 23:13:12 +0530
committerAbhilash Raj2014-09-24 23:13:12 +0530
commite9ab3f31504a176f483c8340b3ad2ba7679fe285 (patch)
tree7c18ee09e1e67f2221d94efb26ee486b823322e3 /src/mailman/testing/layers.py
parentf83f2a07e79c13aef592f779cf112340707cf5c0 (diff)
downloadmailman-e9ab3f31504a176f483c8340b3ad2ba7679fe285.tar.gz
mailman-e9ab3f31504a176f483c8340b3ad2ba7679fe285.tar.zst
mailman-e9ab3f31504a176f483c8340b3ad2ba7679fe285.zip
Diffstat (limited to 'src/mailman/testing/layers.py')
-rw-r--r--src/mailman/testing/layers.py4
1 files changed, 4 insertions, 0 deletions
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