Use a faster hashing algorithm for testing

http://slacy.com/blog/2012/04/make-your-tests-faster-in-django-1-4/

rake fasttest_lms goes from 48 to 26 seconds.
This commit is contained in:
Victor Shnayder
2012-10-15 01:34:45 -04:00
parent 4594d37bf2
commit bc96203807

View File

@@ -172,3 +172,15 @@ FILE_UPLOAD_HANDLERS = (
'django.core.files.uploadhandler.MemoryFileUploadHandler',
'django.core.files.uploadhandler.TemporaryFileUploadHandler',
)
################### Make tests faster
#http://slacy.com/blog/2012/04/make-your-tests-faster-in-django-1-4/
PASSWORD_HASHERS = (
# 'django.contrib.auth.hashers.PBKDF2PasswordHasher',
# 'django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher',
# 'django.contrib.auth.hashers.BCryptPasswordHasher',
'django.contrib.auth.hashers.SHA1PasswordHasher',
'django.contrib.auth.hashers.MD5PasswordHasher',
# 'django.contrib.auth.hashers.CryptPasswordHasher',
)