]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
tests: Save the test project
authorDamien Lespiau <damien.lespiau@intel.com>
Tue, 15 Sep 2015 20:12:07 +0000 (21:12 +0100)
committerStephen Finucane <stephen.finucane@intel.com>
Fri, 13 Nov 2015 21:32:27 +0000 (21:32 +0000)
create_email() can use the default project for its mail. If that is the
case, chances are we are going to use that email later in a test where
we'll want that project to exist.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
patchwork/tests/utils.py

index 4f4906b5128695dff776ad4be85bbcbe2f7d7d7c..931462b6388994797abf4ac3d8b6ade584a024bd 100644 (file)
@@ -118,6 +118,7 @@ def create_email(content, subject = None, sender = None, multipart = False,
         sender = defaults.sender
     if project is None:
         project = defaults.project
+        project.save()
     if content_encoding is None:
         content_encoding = 'us-ascii'