Ticket #24987: 24987-doc.diff

File 24987-doc.diff, 913 bytes (added by Tim Graham, 4 years ago)
  • docs/topics/testing/tools.txt

    diff --git a/docs/topics/testing/tools.txt b/docs/topics/testing/tools.txt
    index 7aaeff9..fd784f0 100644
    a b Use the ``django.test.Client`` class to make requests. 
    340340        ``login()`` method to simulate the effect of a user logging into the
    341341        site.
     343        Inactive users (:attr:`is_active=False
     344        <django.contrib.auth.models.User.is_active>`) are not permitted to login
     345        as this method is meant to be equivalent to the
     346        :func:`~django.contrib.auth.login` view which uses
     347        :class:`~django.contrib.auth.forms.AuthenticationForm` and therefore
     348        defaults to rejecting users who are inactive.
    343350        After you call this method, the test client will have all the cookies
    344351        and session data required to pass any login-based tests that may form
    345352        part of a view.
Back to Top