1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-28 08:06:56 +00:00

Change hashcompat to hashlib to depress warning

This commit is contained in:
zhengxie
2013-09-14 18:11:11 +08:00
parent 67a741e5a4
commit 131b15bb66
14 changed files with 28 additions and 30 deletions

View File

@@ -1,4 +1,5 @@
import datetime
import hashlib
import re
from django.conf import settings
@@ -7,7 +8,6 @@ from django.contrib.sites.models import Site
from django.core import mail
from django.core import management
from django.test import TestCase
from django.utils.hashcompat import sha_constructor
from registration.models import RegistrationProfile
@@ -183,7 +183,7 @@ class RegistrationModelTests(TestCase):
"""
# Due to the way activation keys are constructed during
# registration, this will never be a valid key.
invalid_key = sha_constructor('foo').hexdigest()
invalid_key = hashlib.sha1('foo').hexdigest()
self.failIf(RegistrationProfile.objects.activate_user(invalid_key))
def test_expired_user_deletion(self):