summaryrefslogtreecommitdiffstats
path: root/registration/tests.py
diff options
context:
space:
mode:
authorpjrharley <devnull@localhost>2009-05-22 20:59:03 +0100
committerpjrharley <devnull@localhost>2009-05-22 20:59:03 +0100
commite27f5565cb0ac6643a76401d9f54f82cfa5af2ea (patch)
tree6d5b5f23beba780c5f3b4540ecc6d901de47d625 /registration/tests.py
parent7fe5cd6ede115c16e11cba522ed1694f9a07c843 (diff)
downloadtroggle-e27f5565cb0ac6643a76401d9f54f82cfa5af2ea.tar.gz
troggle-e27f5565cb0ac6643a76401d9f54f82cfa5af2ea.tar.bz2
troggle-e27f5565cb0ac6643a76401d9f54f82cfa5af2ea.zip
[svn] Use hashlib rather than depreciated sha
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 0f26553..9b1ea5e 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 sha
+import hashlib
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(sha.new('foo').hexdigest()))
+ self.failIf(RegistrationProfile.objects.activate_user(hashlib.sha1('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': sha.new('foo').hexdigest() }))
+ kwargs={ 'activation_key': hashlib.sha1('foo').hexdigest() }))
self.failIf(response.context['account'])