diff mbox

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

Message ID 1444387202-25735-11-git-send-email-damien.lespiau@intel.com
State Superseded
Headers show

Commit Message

Damien Lespiau Oct. 9, 2015, 10:39 a.m. UTC
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>
---
 patchwork/tests/utils.py | 1 +
 1 file changed, 1 insertion(+)

Comments

Stephen Finucane Oct. 9, 2015, 11:21 p.m. UTC | #1
> 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>


I'm missing patch 9? As for this patch:

Acked-by: Stephen Finucane <stephen.finucane@intel.com>
diff mbox

Patch

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'