mirror of
https://github.com/django/django.git
synced 2025-08-22 03:24:21 +00:00
[1.6.x] Fixed #21448 -- Fixed test client logout with cookie-based sessions
Thanks Gunnar Scherf for the report and the suggested patch.
Backport of 384816fcc
from master.
This commit is contained in:
parent
6cd5c67b69
commit
655b8bb10b
3 changed files with 7 additions and 0 deletions
|
@ -356,6 +356,10 @@ class ClientTest(TestCase):
|
|||
response = self.client.get('/test_client/login_protected_view/')
|
||||
self.assertRedirects(response, 'http://testserver/accounts/login/?next=/test_client/login_protected_view/')
|
||||
|
||||
@override_settings(SESSION_ENGINE="django.contrib.sessions.backends.signed_cookies")
|
||||
def test_logout_cookie_sessions(self):
|
||||
self.test_logout()
|
||||
|
||||
def test_view_with_permissions(self):
|
||||
"Request a page that is protected with @permission_required"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue