diff options
author | pjrharley <devnull@localhost> | 2009-05-22 20:59:03 +0100 |
---|---|---|
committer | pjrharley <devnull@localhost> | 2009-05-22 20:59:03 +0100 |
commit | a50485729f510e79fa1eeeccdbee57f06598e8cd (patch) | |
tree | 292f629cb67458749ba5a183e03fad6902c529a2 /registration/tests.py | |
parent | f573ffbb5daf02a5cda21337bc7849295a312157 (diff) | |
download | troggle-a50485729f510e79fa1eeeccdbee57f06598e8cd.tar.gz troggle-a50485729f510e79fa1eeeccdbee57f06598e8cd.tar.bz2 troggle-a50485729f510e79fa1eeeccdbee57f06598e8cd.zip |
[svn] Use hashlib rather than depreciated sha
Diffstat (limited to 'registration/tests.py')
-rw-r--r-- | registration/tests.py | 6 |
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']) |