Fixed #18924 -- Made test.Client.logout send user_logged_out signal.

Thanks awsum for the suggestion and Pavel Ponomarev and
Florian Hahn for the patch.
This commit is contained in:
Tim Graham 2013-06-04 12:37:44 -04:00
parent e71b63e280
commit a35ed20241
5 changed files with 102 additions and 7 deletions

View file

@ -623,6 +623,10 @@ Miscellaneous
raises NoReverseMatch. There is no change to {% url %} tag, it causes
template rendering to fail like always when NoReverseMatch is risen.
* :meth:`django.test.client.Client.logout` now calls
:meth:`django.contrib.auth.logout` which will send the
:func:`~django.contrib.auth.signals.user_logged_out` signal.
Features deprecated in 1.6
==========================

View file

@ -696,7 +696,7 @@ Use the ``django.test.client.Client`` class to make requests.
After you call this method, the test client will have all the cookies
and session data cleared to defaults. Subsequent requests will appear
to come from an AnonymousUser.
to come from an :class:`~django.contrib.auth.models.AnonymousUser`.
Testing responses
~~~~~~~~~~~~~~~~~