@@ -57,7 +57,15 @@ def open(self, journaltag):
5757
5858class DiffHelper :
5959 def compareMessages (self , new , old ):
60- """Compare messages for semantic equivalence."""
60+ """Compare messages for semantic equivalence.
61+
62+ Will raise an AssertionError with a diff for inequality.
63+
64+ Note that header fieldnames are case-insensitive.
65+ So if a header fieldname appears more than once in different casing
66+ and the values are not equal, there will be more than one entry
67+ in the diff. Typical examples are "From:"/ "FROM:" and "TO:"/"To:".
68+ """
6169 new = email .message_from_string (new .strip ())
6270 old = email .message_from_string (old .strip ())
6371
@@ -458,7 +466,7 @@ def testNewIssueNoAuthorInfo(self):
458466''' )
459467 self .compareMessages (self ._get_mail (),
460468461- 469+ 462470Content-Type: text/plain; charset="utf-8"
463471Subject: [issue1] Testing...
464472@@ -501,7 +509,7 @@ def testNewIssueNoAuthorEmail(self):
501509''' )
502510 self .compareMessages (self ._get_mail (),
503511504- 512+ 505513Content-Type: text/plain; charset="utf-8"
506514Subject: [issue1] Testing...
507515@@ -2998,7 +3006,7 @@ def testSecurityMessagePermissionContent(self):
29983006 assert os .path .exists (SENDMAILDEBUG )
29993007 self .compareMessages (self ._get_mail (),
300030083001- 3009+ 30023010Content-Type: text/plain; charset="utf-8"
30033011Subject: [issue1] Testing...
30043012
0 commit comments