mirror of https://github.com/zulip/zulip.git
test_auth_backends: Move github_auth_enabled test to new suite.
This is step 1 of a migration to eventually delete the legacy test suite.
This commit is contained in:
parent
2aa8f214d4
commit
29492325a8
|
@ -576,6 +576,10 @@ class GitHubAuthBackendTest(ZulipTestCase):
|
|||
user_profile = get_user(email, realm)
|
||||
self.assertEqual(get_session_dict_user(self.client.session), user_profile.id)
|
||||
|
||||
def test_github_auth_enabled(self) -> None:
|
||||
with self.settings(AUTHENTICATION_BACKENDS=('zproject.backends.GitHubAuthBackend',)):
|
||||
self.assertTrue(github_auth_enabled())
|
||||
|
||||
class GitHubAuthBackendLegacyTest(ZulipTestCase):
|
||||
def setUp(self) -> None:
|
||||
self.user_profile = self.example_user('hamlet')
|
||||
|
@ -596,10 +600,6 @@ class GitHubAuthBackendLegacyTest(ZulipTestCase):
|
|||
with self.settings(AUTHENTICATION_BACKENDS=('zproject.backends.GitHubAuthBackend',)):
|
||||
return authenticate(**kwargs)
|
||||
|
||||
def test_github_auth_enabled(self) -> None:
|
||||
with self.settings(AUTHENTICATION_BACKENDS=('zproject.backends.GitHubAuthBackend',)):
|
||||
self.assertTrue(github_auth_enabled())
|
||||
|
||||
def test_full_name_with_missing_key(self) -> None:
|
||||
self.assertEqual(self.backend.get_full_name(), '')
|
||||
self.assertEqual(self.backend.get_full_name(response={'name': None}), '')
|
||||
|
|
Loading…
Reference in New Issue