Skip to content

Commit

Permalink
Override all the settings at once
Browse files Browse the repository at this point in the history
  • Loading branch information
replaceafill committed Sep 19, 2024
1 parent 6815f3e commit be6c138
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/dashboard/test_oidc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit be6c138

Please sign in to comment.