diff options
author | Yasuhito FUTATSUKI at POEM <futatuki@poem.co.jp> | 2017-03-08 02:08:34 +0900 |
---|---|---|
committer | Yasuhito FUTATSUKI at POEM <futatuki@poem.co.jp> | 2017-03-08 02:08:34 +0900 |
commit | ef630eaf5b387fcf928490d0c80c49403444d55b (patch) | |
tree | e7224f6ab59f63950bf6ffa30fb97fe54255a3fe /tests/test_message.py | |
parent | 0a69c494ed3f92c9527cb5420a879ba272ae01cb (diff) | |
parent | 94a83e81638064e6d70fafe02a9b14b8866635e3 (diff) | |
download | mailman2-ef630eaf5b387fcf928490d0c80c49403444d55b.tar.gz mailman2-ef630eaf5b387fcf928490d0c80c49403444d55b.tar.xz mailman2-ef630eaf5b387fcf928490d0c80c49403444d55b.zip |
Merge lp:mailman/2.1 up to rev 1696
Diffstat (limited to '')
-rw-r--r-- | tests/test_message.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/test_message.py b/tests/test_message.py index 00f524f4..0d2cb622 100644 --- a/tests/test_message.py +++ b/tests/test_message.py @@ -1,4 +1,4 @@ -# Copyright (C) 2001-2010 by the Free Software Foundation, Inc. +# Copyright (C) 2001-2017 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -51,8 +51,14 @@ class TestSentMessage1(EmailBase): msgid = qmsg['message-id'] unless(msgid.startswith('<mailman.')) unless(msgid.endswith('._xtest@dom.ain>')) - eq(qmsg['sender'], '_xtest-bounces@dom.ain') - eq(qmsg['errors-to'], '_xtest-bounces@dom.ain') + # The Sender: header is optional and addresses can be VERPed + if self._mlist.include_sender_header: + sender = qmsg['sender'] + unless(sender.startswith('"_xtest" <_xtest-bounces')) + unless(sender.endswith('@dom.ain>')) + eto = qmsg['errors-to'] + unless(eto.startswith('_xtest-bounces')) + unless(eto.endswith('@dom.ain')) eq(qmsg['x-beenthere'], '_xtest@dom.ain') eq(qmsg['x-mailman-version'], Version.VERSION) eq(qmsg['precedence'], 'bulk') |