]> git.ozlabs.org Git - patchwork/blobdiff - apps/patchwork/tests/utils.py
Resolve removed 'AUTH_PROFILE_MODULE' setting
[patchwork] / apps / patchwork / tests / utils.py
index ec6a9ce366c85b79eea2f0e86278359a022ed4f1..782ed369cca0254a80d20abd5a90b7a70c3f614d 100644 (file)
@@ -37,7 +37,8 @@ _test_mail_dir  = os.path.join(os.path.dirname(__file__), 'mail')
 _test_patch_dir = os.path.join(os.path.dirname(__file__), 'patches')
 
 class defaults(object):
-    project = Project(linkname = 'test-project', name = 'Test Project')
+    project = Project(linkname = 'test-project', name = 'Test Project',
+                      listid = 'test.example.com')
 
     patch_author = 'Patch Author <patch-author@example.com>'
     patch_author_person = Person(name = 'Patch Author',
@@ -58,7 +59,7 @@ class defaults(object):
 """
 
 error_strings = {
-    'email': EmailField.default_error_messages['invalid'],
+    'email': 'Enter a valid email address.',
 }
 
 _user_idx = 1
@@ -78,7 +79,7 @@ def create_user():
 
 def create_maintainer(project):
     user = create_user()
-    profile = user.get_profile()
+    profile = user.profile
     profile.maintainer_projects.add(project)
     profile.save()
     return user
@@ -131,7 +132,7 @@ def create_email(content, subject = None, sender = None, multipart = False,
 
     msg['Subject'] = subject
     msg['From'] = sender
-    msg['List-Id'] = project.linkname
+    msg['List-Id'] = project.listid
 
 
     return msg