From cd88a6e6fba6ab6a3345f7cc79a3e8a69e7dd8d3 Mon Sep 17 00:00:00 2001 From: Mateusz Mandera Date: Fri, 21 May 2021 16:26:33 +0200 Subject: [PATCH] tests: Rename APPLE_JWK to a generic name for re-use in other tests. This can be re-used for the JWK in OIDC implementation in the follow-up commits. --- zerver/tests/fixtures/{apple/jwk => example_jwk} | 0 zerver/tests/test_auth_backends.py | 4 ++-- zproject/test_extra_settings.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename zerver/tests/fixtures/{apple/jwk => example_jwk} (100%) diff --git a/zerver/tests/fixtures/apple/jwk b/zerver/tests/fixtures/example_jwk similarity index 100% rename from zerver/tests/fixtures/apple/jwk rename to zerver/tests/fixtures/example_jwk diff --git a/zerver/tests/test_auth_backends.py b/zerver/tests/test_auth_backends.py index 891f8106c0..7e816d73bd 100644 --- a/zerver/tests/test_auth_backends.py +++ b/zerver/tests/test_auth_backends.py @@ -2533,7 +2533,7 @@ class AppleIdAuthBackendTest(AppleAuthMixin, SocialAuthBase): requests_mock.GET, self.BACKEND_CLASS.JWK_URL, status=200, - json=json.loads(settings.APPLE_JWK), + json=json.loads(settings.EXAMPLE_JWK), ) def generate_access_url_payload(self, account_data_dict: Dict[str, str]) -> str: @@ -2732,7 +2732,7 @@ class AppleAuthBackendNativeFlowTest(AppleAuthMixin, SocialAuthBase): requests_mock.GET, self.BACKEND_CLASS.JWK_URL, status=200, - json=json.loads(settings.APPLE_JWK), + json=json.loads(settings.EXAMPLE_JWK), ) yield diff --git a/zproject/test_extra_settings.py b/zproject/test_extra_settings.py index fe76a6ef09..102a3bb9d4 100644 --- a/zproject/test_extra_settings.py +++ b/zproject/test_extra_settings.py @@ -188,7 +188,7 @@ SOCIAL_AUTH_APPLE_KEY = "KEYISKEY" SOCIAL_AUTH_APPLE_TEAM = "TEAMSTRING" SOCIAL_AUTH_APPLE_SECRET = get_from_file_if_exists("zerver/tests/fixtures/apple/private_key.pem") -APPLE_JWK = get_from_file_if_exists("zerver/tests/fixtures/apple/jwk") +EXAMPLE_JWK = get_from_file_if_exists("zerver/tests/fixtures/example_jwk") APPLE_ID_TOKEN_GENERATION_KEY = get_from_file_if_exists( "zerver/tests/fixtures/apple/token_gen_private_key" )