Commit 8d49649c authored by Arkadiusz Hiler's avatar Arkadiusz Hiler
Browse files

tests: Make read_mail overwrite project correctly

Mail object append headers, so to overwrite them correctly we have to
delete the original one first.

Also fix a chicken and egg problem spotted by this fix.
Signed-off-by: default avatarArkadiusz Hiler <>
parent 6e8e7cd0
Pipeline #11446 passed with stage
in 9 minutes and 18 seconds
......@@ -515,11 +515,11 @@ class MBoxPatchTest(PatchTest):
class GitPullEventTest(PatchTest):
def setUp(self):
self.mail = read_mail('0001-git-pull-request.mbox',
self.p1 = Project(linkname='oss-dev', name='OSS Dev',
self.mail = read_mail('0001-git-pull-request.mbox',
def testGitPullRequest(self):
......@@ -123,6 +123,7 @@ def read_mail(filename, project=None):
if 'Message-Id' not in mail:
mail['Message-Id'] = make_msgid()
if project is not None:
mail['List-Id'] = project.listid
return mail
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment