diff --git a/zerver/tests/test_auth_backends.py b/zerver/tests/test_auth_backends.py index 51d7e97fb4..b35fd3790e 100644 --- a/zerver/tests/test_auth_backends.py +++ b/zerver/tests/test_auth_backends.py @@ -340,6 +340,18 @@ class AuthBackendTest(ZulipTestCase): good_kwargs=good_kwargs, bad_kwargs=bad_kwargs) +class ResponseMock: + def __init__(self, status_code: int, data: Any) -> None: + self.status_code = status_code + self.data = data + + def json(self) -> str: + return self.data + + @property + def text(self) -> str: + return "Response text" + class SocialAuthMixinTest(ZulipTestCase): def test_social_auth_mixing(self) -> None: mixin = SocialAuthMixin() @@ -787,18 +799,6 @@ class GitHubAuthBackendTest(ZulipTestCase): utils.BACKENDS = settings.AUTHENTICATION_BACKENDS -class ResponseMock: - def __init__(self, status_code: int, data: Any) -> None: - self.status_code = status_code - self.data = data - - def json(self) -> str: - return self.data - - @property - def text(self) -> str: - return "Response text" - class GoogleOAuthTest(ZulipTestCase): def google_oauth2_test(self, token_response: ResponseMock, account_response: ResponseMock, *, subdomain: Optional[str]=None,