diff --git a/zerver/tests/test_auth_backends.py b/zerver/tests/test_auth_backends.py index e13d0f2510..69ec51b8f7 100644 --- a/zerver/tests/test_auth_backends.py +++ b/zerver/tests/test_auth_backends.py @@ -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}), '')