[PATCH 24/25] tests: Remove 'defaults' class

Stephen Finucane stephen.finucane at intel.com
Fri Jun 24 07:53:45 AEST 2016


This is no longer needed and can be removed.

Signed-off-by: Stephen Finucane <stephen.finucane at intel.com>
---
 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 1369119..b68f347 100644
--- a/patchwork/tests/utils.py
+++ b/patchwork/tests/utils.py
@@ -50,28 +50,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.',
 }
@@ -228,12 +206,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