From 29492325a8c6969b3ac1f336db0e50df0da7be59 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Wed, 30 May 2018 17:29:27 -0700 Subject: [PATCH] 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. --- zerver/tests/test_auth_backends.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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}), '')