comparison test/test_mailgw.py @ 4970:e2793024bd44

test_mailgw.py fixing the MIME-Version and Precedence duplicate headers of testUnknownUser (partly issue2550877)
author Bernhard Reiter <bernhard@intevation.de>
date Tue, 10 Mar 2015 22:04:29 +0100
parents c355541aaae3
children 65a76a7f3e01
comparison
equal deleted inserted replaced
4969:010ce624b320 4970:e2793024bd44
60 """Compare messages for semantic equivalence.""" 60 """Compare messages for semantic equivalence."""
61 new = email.message_from_string(new.strip()) 61 new = email.message_from_string(new.strip())
62 old = email.message_from_string(old.strip()) 62 old = email.message_from_string(old.strip())
63 63
64 # all Roundup-generated messages have "Precedence: bulk" 64 # all Roundup-generated messages have "Precedence: bulk"
65 old['Precedence'] = 'bulk' 65 if 'Precedence' not in old:
66 old['Precedence'] = 'bulk'
66 67
67 # don't try to compare the date 68 # don't try to compare the date
68 del new['date'], old['date'] 69 del new['date'], old['date']
69 70
70 if not new == old: 71 if not new == old:
2050 Date: Tue, 14 Jul 2009 12:04:11 +0000 2051 Date: Tue, 14 Jul 2009 12:04:11 +0000
2051 Precedence: bulk 2052 Precedence: bulk
2052 X-Roundup-Name: Roundup issue tracker 2053 X-Roundup-Name: Roundup issue tracker
2053 X-Roundup-Loop: hello 2054 X-Roundup-Loop: hello
2054 X-Roundup-Version: 1.4.8 2055 X-Roundup-Version: 1.4.8
2055 MIME-Version: 1.0
2056 2056
2057 --===============0639262320== 2057 --===============0639262320==
2058 Content-Type: text/plain; charset="us-ascii" 2058 Content-Type: text/plain; charset="us-ascii"
2059 MIME-Version: 1.0 2059 MIME-Version: 1.0
2060 Content-Transfer-Encoding: 7bit 2060 Content-Transfer-Encoding: 7bit

Roundup Issue Tracker: http://roundup-tracker.org/