summaryrefslogtreecommitdiff
path: root/tests/auth_tests/test_views.py
diff options
context:
space:
mode:
authorAndrew Nester <andrew.nester.dev@gmail.com>2016-07-22 17:43:54 +0300
committerTim Graham <timograham@gmail.com>2016-07-28 11:57:02 -0400
commit0ba179194bc261f49b04a5eac85322b56a537e45 (patch)
treee67828d4cb5d020bb34afffab062f7c1923ac255 /tests/auth_tests/test_views.py
parent412b4126d70939903df77a72223012b2c021c511 (diff)
Fixed #26929 -- Deprecated extra_context parameter of contrib.auth.views.logout_then_login().
Diffstat (limited to 'tests/auth_tests/test_views.py')
-rw-r--r--tests/auth_tests/test_views.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auth_tests/test_views.py b/tests/auth_tests/test_views.py
index 32c51e41a0..f44c21ac2a 100644
--- a/tests/auth_tests/test_views.py
+++ b/tests/auth_tests/test_views.py
@@ -27,6 +27,7 @@ from django.middleware.csrf import CsrfViewMiddleware, get_token
from django.test import TestCase, override_settings
from django.test.utils import patch_logger
from django.urls import NoReverseMatch, reverse, reverse_lazy
+from django.utils.deprecation import RemovedInDjango21Warning
from django.utils.encoding import force_text
from django.utils.http import urlquote
from django.utils.six.moves.urllib.parse import ParseResult, urlparse
@@ -734,6 +735,10 @@ class LogoutThenLoginTests(AuthViewsTestCase):
self.confirm_logged_out()
self.assertRedirects(response, '/custom/', fetch_redirect_response=False)
+ def test_deprecated_extra_context(self):
+ with self.assertRaisesMessage(RemovedInDjango21Warning, 'The unused `extra_context` parameter'):
+ logout_then_login(None, extra_context={})
+
class LoginRedirectAuthenticatedUser(AuthViewsTestCase):
dont_redirect_url = '/login/redirect_authenticated_user_default/'