Skip to content

Commit

Permalink
Add a note about testing to the README
Browse files Browse the repository at this point in the history
  • Loading branch information
orf authored and dfunckt committed Jul 21, 2018
1 parent 211fcd4 commit c560b96
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ Table of Contents
- `Logging predicate evaluation`_

- `Best practices`_

- `Testing`_

- `API Reference`_
- `Licence`_

Expand Down Expand Up @@ -722,6 +725,21 @@ have ``rules`` do so, just edit your ``INSTALLED_APPS`` setting:
from __future__ import absolute_import
Testing
-------

When using Django's built in `TestClient` using the `force_login` method will
fail unless you specify a specific authentication backend in Django versions
up to 1.10.

To work around this pass ``django.contrib.auth.backends.ModelBackend`` as the
``backend`` argument:

.. code:: python
client.force_login(user, backend='django.contrib.auth.backends.ModelBackend')
API Reference
=============

Expand Down

0 comments on commit c560b96

Please sign in to comment.