1
0
mirror of https://github.com/django/django.git synced 2025-01-28 02:59:58 +00:00
Jay Cox eef95ea96f Fixed #24696 -- Made CSRF_COOKIE computation lazy.
Only compute the CSRF_COOKIE when it is actually used. This is a
significant speedup for clients not using cookies.

Changed result of the “test_token_node_no_csrf_cookie” test:  It gets
a valid CSRF token now which seems like the correct behavior.

Changed auth_tests.test_views.LoginTest.test_login_csrf_rotate to
use get_token() to trigger CSRF cookie inclusion instead of changing
request.META["CSRF_COOKIE_USED"] directly.
2015-05-02 19:45:14 -04:00
..
2015-04-27 08:40:36 -04:00
2015-04-27 08:40:36 -04:00
2015-02-06 09:30:35 -05:00
2015-03-20 17:57:11 -04:00
2015-02-06 09:30:35 -05:00
2015-02-06 12:58:45 +01:00

To run the test suite::

    $ cd tests
    $ pip install -r requirements/py3.txt  # or py2.txt
    $ PYTHONPATH=..:$PYTHONPATH ./runtests.py

For more information about the test suite, see
https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/unit-tests/.