Code

Ticket #10908: 10908.diff

File 10908.diff, 843 bytes (added by timo, 5 years ago)

slightly updated patch with links to methods

Line 
1Index: topics/testing.txt
2===================================================================
3--- topics/testing.txt  (revision 11246)
4+++ topics/testing.txt  (working copy)
5@@ -686,7 +686,12 @@
6         user accounts that are valid on your production site will not work
7         under test conditions. You'll need to create users as part of the test
8         suite -- either manually (using the Django model API) or with a test
9-        fixture.
10+        fixture. If your test user has a password, you must use either
11+        ``User.objects.create()`` and
12+        :meth:`~django.contrib.auth.models.User.set_password()` or the
13+        :meth:`~django.contrib.auth.models.UserManager.create_user` helper
14+        method to ensure the user password is hashed so ``login()`` will work
15+        correctly.
16 
17     .. method:: Client.logout()
18