summaryrefslogtreecommitdiffstats
path: root/apps/patchwork/tests
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2011-03-10 18:06:50 +0800
committerJeremy Kerr <jk@ozlabs.org>2011-03-30 11:35:24 +0800
commite653db155cdb671d6ab1c52492fd37b9f80cb805 (patch)
tree3d244db8e30f5b5128eee80cec12f117b0ec73d4 /apps/patchwork/tests
parenta16f6f8afd0e9487cb3d9b8041f24c7496330086 (diff)
downloadpatchwork-e653db155cdb671d6ab1c52492fd37b9f80cb805.tar.bz2
patchwork-e653db155cdb671d6ab1c52492fd37b9f80cb805.tar.xz
models: use User.post_save signal to create UserProfile objects
Rather than relying on the registration app's callback mechanism to create the UserProfile object, use the post_save signal on auth.User. This means that the UserProfile will be created regardless of how the User was created. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'apps/patchwork/tests')
-rw-r--r--apps/patchwork/tests/utils.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/apps/patchwork/tests/utils.py b/apps/patchwork/tests/utils.py
index 35c4beb..f1c95e8 100644
--- a/apps/patchwork/tests/utils.py
+++ b/apps/patchwork/tests/utils.py
@@ -19,7 +19,7 @@
import os
import codecs
-from patchwork.models import Project, Person, UserProfile
+from patchwork.models import Project, Person
from django.contrib.auth.models import User
from email import message_from_file
@@ -66,9 +66,6 @@ def create_user():
user = User.objects.create_user(userid, email, userid)
user.save()
- profile = UserProfile(user = user)
- profile.save()
-
return user
def create_maintainer(project):