diff options
| author | Barry Warsaw | 2013-11-26 17:07:11 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2013-11-26 17:07:11 -0500 |
| commit | 177d3f81f4c786ad51083dfce6c4a5fd127693bd (patch) | |
| tree | d4ae3568314fba0b194cdea7722284d7afd06724 /src | |
| parent | 833633741f110354408b3e0cfd7f733a2541e97c (diff) | |
| download | mailman-177d3f81f4c786ad51083dfce6c4a5fd127693bd.tar.gz mailman-177d3f81f4c786ad51083dfce6c4a5fd127693bd.tar.zst mailman-177d3f81f4c786ad51083dfce6c4a5fd127693bd.zip | |
Diffstat (limited to 'src')
| -rw-r--r-- | src/mailman/model/tests/test_mailinglist.py | 6 | ||||
| -rw-r--r-- | src/mailman/runners/tests/test_archiver.py | 1 | ||||
| -rw-r--r-- | src/mailman/testing/helpers.py | 4 |
3 files changed, 10 insertions, 1 deletions
diff --git a/src/mailman/model/tests/test_mailinglist.py b/src/mailman/model/tests/test_mailinglist.py index 09c4cb38f..b2dbbf1ca 100644 --- a/src/mailman/model/tests/test_mailinglist.py +++ b/src/mailman/model/tests/test_mailinglist.py @@ -70,8 +70,12 @@ class TestListArchiver(unittest.TestCase): archiver = archiver_set.get('prototype') self.assertTrue(archiver.is_enabled) # Disable the site-wide archiver. - archiver.system_archiver.is_enabled = False + config.push('enable prototype', """\ + [archiver.prototype] + enable: no + """) self.assertFalse(archiver.is_enabled) + config.pop('enable prototype') diff --git a/src/mailman/runners/tests/test_archiver.py b/src/mailman/runners/tests/test_archiver.py index f0ac00458..f7087f28f 100644 --- a/src/mailman/runners/tests/test_archiver.py +++ b/src/mailman/runners/tests/test_archiver.py @@ -246,6 +246,7 @@ First post! # global archivers. No messages will get archived. for archiver in IListArchiverSet(self._mlist).archivers: archiver.is_enabled = False + config.db.store.commit() self._archiveq.enqueue( self._msg, {}, listname=self._mlist.fqdn_listname) diff --git a/src/mailman/testing/helpers.py b/src/mailman/testing/helpers.py index 8201f952a..9f9e28dc6 100644 --- a/src/mailman/testing/helpers.py +++ b/src/mailman/testing/helpers.py @@ -478,6 +478,10 @@ def reset_the_world(): with transaction(): for message in message_store.messages: message_store.delete_message(message['message-id']) + # Delete any other residual messages. + for dirpath, dirnames, filenames in os.walk(config.MESSAGES_DIR): + for filename in filenames: + os.remove(os.path.join(dirpath, filename)) # Reset the global style manager. getUtility(IStyleManager).populate() # Remove all dynamic header-match rules. |
