summaryrefslogtreecommitdiffstats
path: root/registration/tests.py
diff options
context:
space:
mode:
authorpjrharley <devnull@localhost>2009-05-23 21:13:53 +0100
committerpjrharley <devnull@localhost>2009-05-23 21:13:53 +0100
commit14b39d906c74bd491f2cb2ff13338efe7f190d8a (patch)
tree15f29c48e7bcf602f24edcd277e44f1ecd5287c9 /registration/tests.py
parent0508ba299c4f26ce6cbabd58af5692e04fa04d49 (diff)
downloadtroggle-14b39d906c74bd491f2cb2ff13338efe7f190d8a.tar.gz
troggle-14b39d906c74bd491f2cb2ff13338efe7f190d8a.tar.bz2
troggle-14b39d906c74bd491f2cb2ff13338efe7f190d8a.zip
[svn] Use the django compatability thing - webserver might have old python on it....
Diffstat (limited to 'registration/tests.py')
-rw-r--r--registration/tests.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/registration/tests.py b/registration/tests.py
index 9b1ea5e..df6bb2d 100644
--- a/registration/tests.py
+++ b/registration/tests.py
@@ -20,7 +20,7 @@ getting django-registration running in the default setup, to wit:
"""
import datetime
-import hashlib
+from django.utils.hashcompat import sha_constructor
from django.conf import settings
from django.contrib.auth.models import User
@@ -115,7 +115,7 @@ class RegistrationModelTests(RegistrationTestCase):
self.failIf(RegistrationProfile.objects.activate_user('foo'))
# Activating from a key that doesn't exist returns False.
- self.failIf(RegistrationProfile.objects.activate_user(hashlib.sha1('foo').hexdigest()))
+ self.failIf(RegistrationProfile.objects.activate_user(sha_constructor('foo').hexdigest()))
def test_account_expiration_condition(self):
"""
@@ -351,5 +351,5 @@ class RegistrationViewTests(RegistrationTestCase):
# Nonexistent key sets the account to False.
response = self.client.get(reverse('registration_activate',
- kwargs={ 'activation_key': hashlib.sha1('foo').hexdigest() }))
+ kwargs={ 'activation_key': sha_constructor('foo').hexdigest() }))
self.failIf(response.context['account'])