[PATCH 10/15] tests: Save the test project if we're going to use it

Damien Lespiau damien.lespiau at intel.com
Fri Oct 9 21:39:57 AEDT 2015


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 at intel.com>
---
 patchwork/tests/utils.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/patchwork/tests/utils.py b/patchwork/tests/utils.py
index 4f4906b..931462b 100644
--- a/patchwork/tests/utils.py
+++ b/patchwork/tests/utils.py
@@ -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'
 
-- 
2.1.0



More information about the Patchwork mailing list