mirror of
https://github.com/django/django.git
synced 2025-09-08 03:30:48 +00:00
Fixed #24855 -- Allowed using contrib.auth.login() without credentials.
Added an optional `backend` argument to login().
This commit is contained in:
parent
bd3c2900fc
commit
b643386668
7 changed files with 95 additions and 21 deletions
|
@ -522,7 +522,6 @@ class ClientTest(TestCase):
|
|||
|
||||
# Log in
|
||||
self.client.force_login(self.u1, backend='test_client.auth_backends.TestClientBackend')
|
||||
self.assertEqual(self.u1.backend, 'test_client.auth_backends.TestClientBackend')
|
||||
|
||||
# Request a page that requires a login
|
||||
response = self.client.get('/login_protected_view/')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue