diff --git a/README.rst b/README.rst index f95f39f..f5a155d 100644 --- a/README.rst +++ b/README.rst @@ -69,6 +69,9 @@ Table of Contents - `Logging predicate evaluation`_ - `Best practices`_ + + - `Testing`_ + - `API Reference`_ - `Licence`_ @@ -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 =============