← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:py3-email-header-folding into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:py3-email-header-folding into launchpad:master.

Commit message:
Handle slightly different email header folding on Python 3

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/398921

The exact details of whether white space in the header is folded aren't interesting here.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:py3-email-header-folding into launchpad:master.
diff --git a/lib/lp/code/mail/tests/test_branchmergeproposal.py b/lib/lp/code/mail/tests/test_branchmergeproposal.py
index 4bfd3db..f121fa7 100644
--- a/lib/lp/code/mail/tests/test_branchmergeproposal.py
+++ b/lib/lp/code/mail/tests/test_branchmergeproposal.py
@@ -5,6 +5,7 @@
 
 from difflib import unified_diff
 import operator
+import re
 from textwrap import dedent
 
 from lazr.lifecycle.event import ObjectModifiedEvent
@@ -525,9 +526,9 @@ class TestMergeProposalMailing(TestCaseWithFactory):
                          'who were implicitly subscribed to their branches.')
         email = emails[0]
         self.assertEqual('[Merge] '
-            'lp://dev/~bob/super-product/fix-foo-for-bar into\n'
+            'lp://dev/~bob/super-product/fix-foo-for-bar into'
             ' lp://dev/~mary/super-product/bar',
-            email['subject'].replace('\n\t', '\n '))
+            re.sub(r'\n[\t ]', ' ', email['subject']))
         bmp = job.branch_merge_proposal
         expected = dedent("""\
             The proposal to merge %(source)s into %(target)s has been updated.