summaryrefslogtreecommitdiff
path: root/src/mailman/app
diff options
context:
space:
mode:
authorAurélien Bompard2015-11-25 19:40:22 +0100
committerBarry Warsaw2015-12-02 22:18:02 -0500
commit054b412ad200924e2c7642b63ab4f300efc27b3b (patch)
tree618fe159b734e9fe3542d7c69a89918cf39921b2 /src/mailman/app
parent015a498f735cfc3a90ae07bd178ebb1c6f4bf8e0 (diff)
downloadmailman-054b412ad200924e2c7642b63ab4f300efc27b3b.tar.gz
mailman-054b412ad200924e2c7642b63ab4f300efc27b3b.tar.zst
mailman-054b412ad200924e2c7642b63ab4f300efc27b3b.zip
Handle deleting nonexistent messages from the message store. Closes: #167
Diffstat (limited to 'src/mailman/app')
-rw-r--r--src/mailman/app/tests/test_moderation.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mailman/app/tests/test_moderation.py b/src/mailman/app/tests/test_moderation.py
index 006348a3d..12dadf6fb 100644
--- a/src/mailman/app/tests/test_moderation.py
+++ b/src/mailman/app/tests/test_moderation.py
@@ -153,6 +153,15 @@ Message-ID: <alpha>
self.assertEqual(messages[0].msgdata['recipients'],
['zack@example.com'])
+ def test_survive_a_deleted_message(self):
+ # When the message that should be deleted is not found in the store,
+ # no error is raised.
+ request_id = hold_message(self._mlist, self._msg)
+ message_store = getUtility(IMessageStore)
+ message_store.delete_message('<alpha>')
+ handle_message(self._mlist, request_id, Action.discard)
+ self.assertEqual(self._request_db.count, 0)
+
class TestUnsubscription(unittest.TestCase):