Author: russellm Date: 2009-07-16 11:06:53 -0500 (Thu, 16 Jul 2009) New Revision: 11248
Modified: django/trunk/docs/topics/testing.txt Log: Fixed #10908 -- Clarified the procedure for creating test users in the testing docs. Thanks to gruszczy and timo. Modified: django/trunk/docs/topics/testing.txt =================================================================== --- django/trunk/docs/topics/testing.txt 2009-07-16 03:02:08 UTC (rev 11247) +++ django/trunk/docs/topics/testing.txt 2009-07-16 16:06:53 UTC (rev 11248) @@ -686,7 +686,13 @@ user accounts that are valid on your production site will not work under test conditions. You'll need to create users as part of the test suite -- either manually (using the Django model API) or with a test - fixture. + fixture. Remember that if you want your test user to have a password, + you can't set the user's password by setting the password attribute + directly -- you must use the + :meth:`~django.contrib.auth.models.User.set_password()` function to + store a correctly hashed password. Alternatively, you can use the + :meth:`~django.contrib.auth.models.UserManager.create_user` helper + method to create a new user with a correctly hashed password. .. method:: Client.logout() --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---