[PATCH 4/6] tests: Remove 'defaults' class

Stephen Finucane stephen.finucane at intel.com
Fri Jul 1 03:30:25 AEST 2016


This is no longer needed and can be removed.

Signed-off-by: Stephen Finucane <stephen.finucane at intel.com>
Reviewed-by: Andy Doan <andy.doan at linaro.org>
---
 patchwork/tests/utils.py |   29 ++---------------------------
 1 files changed, 2 insertions(+), 27 deletions(-)

diff --git a/patchwork/tests/utils.py b/patchwork/tests/utils.py
index 699f6d6..dc87679 100644
--- a/patchwork/tests/utils.py
+++ b/patchwork/tests/utils.py
@@ -52,28 +52,6 @@ def read_patch(filename, encoding=None):
     return f.read()
 
 
-class defaults(object):
-    project = Project(linkname='test-project', name='Test Project',
-                      listid='test.example.com')
-
-    patch_author = 'Patch Author <patch-author at example.com>'
-    patch_author_person = Person(name='Patch Author',
-                                 email='patch-author at example.com')
-
-    comment_author = 'Comment Author <comment-author at example.com>'
-
-    sender = 'Test Author <test-author at example.com>'
-
-    subject = 'Test Subject'
-
-    patch_name = 'Test Patch'
-
-    patch = """--- /dev/null	2011-01-01 00:00:00.000000000 +0800
-+++ a	2011-01-01 00:00:00.000000000 +0800
-@@ -0,0 +1 @@
-+a
-"""
-
 error_strings = {
     'email': 'Enter a valid email address.',
 }
@@ -252,12 +230,9 @@ def _create_submissions(create_func, count=1, **kwargs):
         count (int): Number of patches to create
         kwargs (dict): Overrides for various patch fields
     """
-    defaults.project.save()
-    defaults.patch_author_person.save()
-
     values = {
-        'project': defaults.project,
-        'submitter': defaults.patch_author_person,
+        'project': create_project(),
+        'submitter': create_person(),
     }
     values.update(kwargs)
 
-- 
1.7.4.1



More information about the Patchwork mailing list