mirror of https://github.com/zulip/zulip.git
auth: Fix GitHub test for invalid user account.
This commit is contained in:
parent
251a537e0d
commit
0377288f68
|
@ -507,9 +507,8 @@ class GitHubAuthBackendTest(ZulipTestCase):
|
||||||
|
|
||||||
def test_github_backend_authenticate_nonexisting_user(self):
|
def test_github_backend_authenticate_nonexisting_user(self):
|
||||||
# type: () -> None
|
# type: () -> None
|
||||||
with mock.patch('zproject.backends.get_user_profile_by_email',
|
self.backend.strategy.session_set('subdomain', 'zulip')
|
||||||
side_effect=UserProfile.DoesNotExist("Do not exist")):
|
response = dict(email="invalid@zulip.com", name=self.name)
|
||||||
response = dict(email=self.email, name=self.name)
|
|
||||||
return_data = dict() # type: Dict[str, Any]
|
return_data = dict() # type: Dict[str, Any]
|
||||||
user = self.backend.authenticate(return_data=return_data, response=response)
|
user = self.backend.authenticate(return_data=return_data, response=response)
|
||||||
self.assertIs(user, None)
|
self.assertIs(user, None)
|
||||||
|
|
Loading…
Reference in New Issue