diff options
| author | Barry Warsaw | 2007-09-16 22:10:05 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2007-09-16 22:10:05 -0400 |
| commit | b8d3aa11b35814804f70b5f3e38549df1150aaac (patch) | |
| tree | 39bfa4684cf94d172d74cb5d1c503864eb0ce2f3 /Mailman/tests/test_documentation.py | |
| parent | 0d623d7684e2ad8309219da934fc956a498e3a71 (diff) | |
| download | mailman-b8d3aa11b35814804f70b5f3e38549df1150aaac.tar.gz mailman-b8d3aa11b35814804f70b5f3e38549df1150aaac.tar.zst mailman-b8d3aa11b35814804f70b5f3e38549df1150aaac.zip | |
Finish clean up of ListAdmin class removal. Start by actually
removing the module. Then, fix a few tests that failed as a result of
this work.
Mailman/Handlers/Hold.py: Call hold_message() instead of
mlist.HoldMessage().
The message store also no longer requires a Date: header, so clean up
a few tests that were still expecting that.
Extend cleaning_teardown() in test_documentation.py so that both the
message store and any list-centric requests are cleaned up after each
test.
Diffstat (limited to 'Mailman/tests/test_documentation.py')
| -rw-r--r-- | Mailman/tests/test_documentation.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Mailman/tests/test_documentation.py b/Mailman/tests/test_documentation.py index 0dab2c2dd..825a95a3c 100644 --- a/Mailman/tests/test_documentation.py +++ b/Mailman/tests/test_documentation.py @@ -45,6 +45,9 @@ def cleaning_teardown(testobj): member.unsubscribe() for admin in mlist.administrators.members: admin.unsubscribe() + requestdb = config.db.requests.get_list_requests(mlist) + for request in requestdb.held_requests: + requestdb.delete_request(request.id) listmgr.delete(mlist) flush() assert not list(listmgr.mailing_lists), ( @@ -62,6 +65,16 @@ def cleaning_teardown(testobj): for style in style_manager.styles: if style.name <> 'default': style_manager.unregister(style) + # Clear the message store. + global_ids = [] + for msg in config.db.message_store.messages: + global_ids.append('%s/%s' % ( + msg['X-List-ID-Hash'], msg['X-List-Sequence-Number'])) + for global_id in global_ids: + config.db.message_store.delete_message(global_id) + flush() + assert not list(config.db.message_store.messages), ( + 'There should be no messages left in the message store.') |
