diff options
| author | Barry Warsaw | 2011-04-10 18:03:37 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2011-04-10 18:03:37 -0400 |
| commit | 37038a683cd909438a6dee43beb9b258ef4e4313 (patch) | |
| tree | df50eabfcc890f01203d90c453dc1b1dbde65d2c /src/mailman/testing/layers.py | |
| parent | cce9729cac32b6c5fe2acc77b2bfb6b7c545711f (diff) | |
| parent | ef3a4a87e2c0f4b640e31afc4828d2edbd005846 (diff) | |
| download | mailman-37038a683cd909438a6dee43beb9b258ef4e4313.tar.gz mailman-37038a683cd909438a6dee43beb9b258ef4e4313.tar.zst mailman-37038a683cd909438a6dee43beb9b258ef4e4313.zip | |
Trunk merge
Diffstat (limited to 'src/mailman/testing/layers.py')
| -rw-r--r-- | src/mailman/testing/layers.py | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/src/mailman/testing/layers.py b/src/mailman/testing/layers.py index 319248ebb..353dd9edd 100644 --- a/src/mailman/testing/layers.py +++ b/src/mailman/testing/layers.py @@ -46,8 +46,7 @@ from mailman.core import initialize from mailman.core.initialize import INHIBIT_CONFIG_FILE from mailman.core.logging import get_handler from mailman.interfaces.domain import IDomainManager -from mailman.interfaces.messages import IMessageStore -from mailman.testing.helpers import TestableMaster +from mailman.testing.helpers import TestableMaster, reset_the_world from mailman.testing.mta import ConnectionCountingController from mailman.utilities.datetime import factory from mailman.utilities.string import expand @@ -179,19 +178,7 @@ class ConfigLayer(MockAndMonkeyLayer): @classmethod def testTearDown(cls): - # Reset the database between tests. - config.db._reset() - # Remove all residual queue files. - for dirpath, dirnames, filenames in os.walk(config.QUEUE_DIR): - for filename in filenames: - os.remove(os.path.join(dirpath, filename)) - # Clear out messages in the message store. - message_store = getUtility(IMessageStore) - for message in message_store.messages: - message_store.delete_message(message['message-id']) - config.db.commit() - # Reset the global style manager. - config.style_manager.populate() + reset_the_world() # Flag to indicate that loggers should propagate to the console. stderr = False |
