mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #24855 -- Allowed using contrib.auth.login() without credentials.
Added an optional `backend` argument to login().
This commit is contained in:
@@ -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/')
|
||||
|
||||
Reference in New Issue
Block a user