'Request a page that is protected with @login_required when using
force_login() and passing a backend.'

@override_settings(AUTHENTICATION_BACKENDS=['django.contrib.auth.backends.ModelBackend', 'test_client.auth_backends.TestClientBackend'])
def test_force_login_with_backend(self):

    response = self.client.get('/login_protected_view/')
    self.assertRedirects(response, '/accounts/login/?next=/login_protected_view/')
    self.client.force_login(self.u1, backend='test_client.auth_backends.TestClientBackend')
    self.assertEqual(self.u1.backend, 'test_client.auth_backends.TestClientBackend')
    response = self.client.get('/login_protected_view/')
    self.assertEqual(response.status_code, 200)
    self.assertEqual(response.context['user'].username, 'testclient')
