From: Stephen Finucane Date: Thu, 30 Jun 2016 17:30:25 +0000 (+0100) Subject: tests: Remove 'defaults' class X-Git-Tag: v2.0.0-rc1~303 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4f714b7e041216c6227710da778adf91b08a84f;p=thirdparty%2Fpatchwork.git tests: Remove 'defaults' class This is no longer needed and can be removed. Signed-off-by: Stephen Finucane Reviewed-by: Andy Doan --- diff --git a/patchwork/tests/utils.py b/patchwork/tests/utils.py index 699f6d60..dc87679b 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_person = Person(name='Patch Author', - email='patch-author@example.com') - - comment_author = 'Comment Author ' - - sender = 'Test Author ' - - 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)