diff options
| author | bwarsaw | 2006-07-08 17:45:13 +0000 |
|---|---|---|
| committer | bwarsaw | 2006-07-08 17:45:13 +0000 |
| commit | 0e9fb0aec9fcf0027dd354b48196b1fa0d420c4d (patch) | |
| tree | f63ad44589e00c13e92cf0e83461ecb22dc5aeff /Mailman/testing/test_message.py | |
| parent | cbef3114de3e80b9436d909b11568858e3a1cf42 (diff) | |
| download | mailman-0e9fb0aec9fcf0027dd354b48196b1fa0d420c4d.tar.gz mailman-0e9fb0aec9fcf0027dd354b48196b1fa0d420c4d.tar.zst mailman-0e9fb0aec9fcf0027dd354b48196b1fa0d420c4d.zip | |
Fix test_message.py by finishing the wind-through of the configuration object
and fixing the invocation and shutdown of mailmanctl. While the tests in this
module work individually, they do not yet work as a group.
-C added to testall.py, and mailmanctl now passes that flag on to qrunner.
UserNotification sets reduced_list_header in the msgdata, but the behavior of
this flag has changed. It used to suppress List-Help, List-Subscribe, and
List-Unsubscribe as well as List-Post and List-Archive. However, List-Help,
List-Subscribe and List-Unsubscribe should definitely be included in
UserNotifications, and List-Post has a different variable controlling it now.
Therefore, always add List-Help, List-Subscribe, and List-Unsubscribe.
Some style updates to Message.py
Diffstat (limited to 'Mailman/testing/test_message.py')
| -rw-r--r-- | Mailman/testing/test_message.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/Mailman/testing/test_message.py b/Mailman/testing/test_message.py index 93e0525e9..504adfc9e 100644 --- a/Mailman/testing/test_message.py +++ b/Mailman/testing/test_message.py @@ -45,21 +45,22 @@ class TestSentMessage(EmailBase): msgid = qmsg['message-id'] unless(msgid.startswith('<mailman.')) unless(msgid.endswith('._xtest@dom.ain>')) - eq(qmsg['sender'], '_xtest-admin@dom.ain') - eq(qmsg['errors-to'], '_xtest-admin@dom.ain') + eq(qmsg['sender'], '_xtest-bounces@dom.ain') + eq(qmsg['errors-to'], '_xtest-bounces@dom.ain') eq(qmsg['x-beenthere'], '_xtest@dom.ain') eq(qmsg['x-mailman-version'], Version.VERSION) eq(qmsg['precedence'], 'bulk') + # UserNotifications have reduced_list_headers so it won't have + # List-Help, List-Subscribe, or List-Unsubscribe. XXX Why would that + # possibly be? eq(qmsg['list-help'], '<mailto:_xtest-request@dom.ain?subject=help>') - eq(qmsg['list-post'], '<mailto:_xtest@dom.ain>') eq(qmsg['list-subscribe'], """\ <http://www.dom.ain/mailman/listinfo/_xtest>, - <mailto:_xtest-request@dom.ain?subject=subscribe>""") +\t<mailto:_xtest-request@dom.ain?subject=subscribe>""") eq(qmsg['list-id'], '<_xtest.dom.ain>') eq(qmsg['list-unsubscribe'], """\ <http://www.dom.ain/mailman/listinfo/_xtest>, - <mailto:_xtest-request@dom.ain?subject=unsubscribe>""") - eq(qmsg['list-archive'], '<http://www.dom.ain/pipermail/_xtest>') +\t<mailto:_xtest-request@dom.ain?subject=unsubscribe>""") eq(qmsg.get_payload(), 'About your test list') def test_bounce_message(self): @@ -81,11 +82,11 @@ yadda yadda yadda # message. msg1 = qmsg.get_payload(0) eq(msg1.get_type(), 'text/plain') - eq(msg1.get_payload(), '[No bounce details are available]\n') + eq(msg1.get_payload(), '[No bounce details are available]') msg2 = qmsg.get_payload(1) eq(msg2.get_type(), 'message/rfc822') - unless(not msg2.is_multipart()) - msg3 = msg2.get_payload() + unless(msg2.is_multipart()) + msg3 = msg2.get_payload(0) eq(msg3.get_payload(), 'yadda yadda yadda\n') |
