diff options
Diffstat (limited to 'src/mailman/testing')
| -rw-r--r-- | src/mailman/testing/layers.py | 7 | ||||
| -rw-r--r-- | src/mailman/testing/testing.cfg | 6 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/mailman/testing/layers.py b/src/mailman/testing/layers.py index 4a9841fc2..6104e64f7 100644 --- a/src/mailman/testing/layers.py +++ b/src/mailman/testing/layers.py @@ -190,10 +190,11 @@ 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 in case the tests are rerun with a database layer like mysql or - # postgresql which are not deleted in teardown. reset_the_world() + # Destroy the test database after the tests are done so that there is + # no data in case the tests are rerun with a database layer like mysql + # or postgresql which are not deleted in teardown. + config.db.destroy() config.pop('test config') shutil.rmtree(cls.var_dir) cls.var_dir = None diff --git a/src/mailman/testing/testing.cfg b/src/mailman/testing/testing.cfg index 43ae6e67e..ff2034069 100644 --- a/src/mailman/testing/testing.cfg +++ b/src/mailman/testing/testing.cfg @@ -18,9 +18,9 @@ # A testing configuration. # For testing against PostgreSQL. -# [database] -# class: mailman.database.postgresql.PostgreSQLDatabase -# url: postgresql://$USER:$USER@localhost/mailman_test +[database] +class: mailman.database.postgresql.PostgreSQLDatabase +url: postgresql://barry:barry@localhost:5433/mailman [mailman] site_owner: noreply@example.com |
