diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2014-06-03 21:15:42 +0800 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2014-06-03 21:18:29 +0800 |
commit | 1d46858f7ee46c5f2e052292cf84863b76b06e04 (patch) | |
tree | d1ffa799214b4d13304b3389b6acfea1585d38e7 | |
parent | 2c2f5e99038e223a8baed9766779fc6dbc98137e (diff) | |
download | patchwork-1d46858f7ee46c5f2e052292cf84863b76b06e04.tar.bz2 patchwork-1d46858f7ee46c5f2e052292cf84863b76b06e04.tar.xz |
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 <jk@ozlabs.org>
-rw-r--r-- | apps/patchwork/tests/utils.py | 5 |
1 files changed, 3 insertions, 2 deletions
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@example.com>' 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 |