diff options
| author | Ben Demboski <ben@joltlabs.com> | 2016-08-05 17:18:12 -0700 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-08-06 08:41:41 -0400 |
| commit | fc8f097117af7ada616fad20ae5b417fcf740413 (patch) | |
| tree | af62e08ef7a67cf8de506b51073f71f58498ffb3 /django | |
| parent | 4f113483d7ce642518883956e338be8d178e6a55 (diff) | |
Fixed #27027 -- Restored Client.force_login() defaulting to the first auth backend.
Diffstat (limited to 'django')
| -rw-r--r-- | django/test/client.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/django/test/client.py b/django/test/client.py index dc813716d6..2b5840b49e 100644 --- a/django/test/client.py +++ b/django/test/client.py @@ -626,6 +626,9 @@ class Client(RequestFactory): return False def force_login(self, user, backend=None): + if backend is None: + backend = settings.AUTHENTICATION_BACKENDS[0] + user.backend = backend self._login(user, backend) def _login(self, user, backend=None): |
