From be6c138addf0d15fb3a5176591ddf4ed711034bc Mon Sep 17 00:00:00 2001 From: "Douglas Cerna (Soy Douglas)" Date: Thu, 19 Sep 2024 23:04:27 +0000 Subject: [PATCH] Override all the settings at once --- tests/dashboard/test_oidc.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/dashboard/test_oidc.py b/tests/dashboard/test_oidc.py index 0dfa2b97a3..f94b609f21 100644 --- a/tests/dashboard/test_oidc.py +++ b/tests/dashboard/test_oidc.py @@ -3,18 +3,18 @@ from django.test import override_settings -@override_settings(OIDC_OP_TOKEN_ENDPOINT="https://example.com/token") -@override_settings(OIDC_OP_USER_ENDPOINT="https://example.com/user") -@override_settings(OIDC_RP_CLIENT_ID="rp_client_id") -@override_settings(OIDC_RP_CLIENT_SECRET="rp_client_secret") @override_settings( + OIDC_OP_TOKEN_ENDPOINT="https://example.com/token", + OIDC_OP_USER_ENDPOINT="https://example.com/user", + OIDC_RP_CLIENT_ID="rp_client_id", + OIDC_RP_CLIENT_SECRET="rp_client_secret", OIDC_ACCESS_ATTRIBUTE_MAP={ "given_name": "first_name", "family_name": "last_name", - } + }, + OIDC_ID_ATTRIBUTE_MAP={"email": "email"}, + OIDC_USERNAME_ALGO=lambda email: email, ) -@override_settings(OIDC_ID_ATTRIBUTE_MAP={"email": "email"}) -@override_settings(OIDC_USERNAME_ALGO=lambda email: email) class TestOIDC(TestCase): def test_create_user(self): backend = CustomOIDCBackend()