Skip to content

Commit 17d6cd9

Browse files
committed
Fixed django#18157 -- Documented that setting PASSWORD_HASHERS can speed up tests
1 parent 514e827 commit 17d6cd9

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/topics/testing.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,18 @@ failed and erroneous tests. If all the tests pass, the return code is 0. This
545545
feature is useful if you're using the test-runner script in a shell script and
546546
need to test for success or failure at that level.
547547

548+
Speeding up the tests
549+
---------------------
550+
551+
In recent versions of Django, the default password hasher is rather slow by
552+
design. If during your tests you are authenticating many users, you may want
553+
to use a custom settings file and set the :setting:`PASSWORD_HASHERS` setting
554+
to a faster hashing algorithm::
555+
556+
PASSWORD_HASHERS = (
557+
'django.contrib.auth.hashers.MD5PasswordHasher',
558+
)
559+
548560
Testing tools
549561
=============
550562

0 commit comments

Comments
 (0)