From: Jeremy Kerr Date: Tue, 3 Jun 2014 13:15:42 +0000 (+0800) Subject: tests/utils: Fix List-Id headers on emails from create_email X-Git-Url: https://git.ozlabs.org/?a=commitdiff_plain;h=1d46858f7ee46c5f2e052292cf84863b76b06e04;p=patchwork tests/utils: Fix List-Id headers on emails from create_email We need to use the project's List Id in the List-Id header, not the linkname. We'll also need to populate the .listid member of defaults.project. Signed-off-by: Jeremy Kerr --- diff --git a/apps/patchwork/tests/utils.py b/apps/patchwork/tests/utils.py index 3f57baf..c36b6c1 100644 --- a/apps/patchwork/tests/utils.py +++ b/apps/patchwork/tests/utils.py @@ -37,7 +37,8 @@ _test_mail_dir = os.path.join(os.path.dirname(__file__), 'mail') _test_patch_dir = os.path.join(os.path.dirname(__file__), 'patches') class defaults(object): - project = Project(linkname = 'test-project', name = 'Test Project') + project = Project(linkname = 'test-project', name = 'Test Project', + listid = 'test.example.com') patch_author = 'Patch Author ' patch_author_person = Person(name = 'Patch Author', @@ -131,7 +132,7 @@ def create_email(content, subject = None, sender = None, multipart = False, msg['Subject'] = subject msg['From'] = sender - msg['List-Id'] = project.linkname + msg['List-Id'] = project.listid return msg