auth: Set the subdomain in more GitHub auth tests.

This should have been set in basically all of these tests to set them
up properly, and this issue will matter after upcoming changes.
This commit is contained in:
Tim Abbott
2017-11-21 15:46:34 -08:00
committed by Greg Price
parent 732dd1b6a3
commit 251a537e0d

View File

@@ -421,6 +421,7 @@ class GitHubAuthBackendTest(ZulipTestCase):
with mock.patch('social_core.backends.github.GithubOAuth2.do_auth',
side_effect=self.do_auth), \
mock.patch('zproject.backends.SocialAuthMixin.process_do_auth') as result:
self.backend.strategy.session_set('subdomain', 'zulip')
response = dict(email=self.email, name=self.name)
self.backend.do_auth('fake-access-token', response=response)
@@ -435,6 +436,7 @@ class GitHubAuthBackendTest(ZulipTestCase):
side_effect=AuthFailed('Not found')), \
mock.patch('logging.info'), \
mock.patch('zproject.backends.SocialAuthMixin.process_do_auth') as result:
self.backend.strategy.session_set('subdomain', 'zulip')
response = dict(email=self.email, name=self.name)
self.backend.do_auth('fake-access-token', response=response)