Add test for ZulipRemoteUserBackend.

This commit is contained in:
Umair Khan 2016-10-26 17:01:30 +05:00 committed by Tim Abbott
parent 839cab3434
commit 8064ed1c0b
1 changed files with 5 additions and 0 deletions

View File

@ -805,6 +805,11 @@ class TestZulipRemoteUserBackend(ZulipTestCase):
self.assertEqual(result.status_code, 302)
self.assertEqual(get_session_dict_user(self.client.session), user_profile.id)
def test_authenticate_with_missing_user(self):
# type: () -> None
backend = ZulipRemoteUserBackend()
self.assertIs(backend.authenticate(None), None)
def test_login_success_with_sso_append_domain(self):
# type: () -> None
username = 'hamlet'