mirror of
https://github.com/pretix/pretix.git
synced 2026-05-04 15:04:03 +00:00
OpenID Connect RP support for customer accounts
This commit is contained in:
committed by
Raphael Michel
parent
e102a590ab
commit
7f5518dbf6
@@ -140,6 +140,29 @@ def test_customer_patch(token_client, organizer, customer):
|
||||
assert customer.email == 'blubb@example.org'
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_customer_patch_with_provider(token_client, organizer, customer):
|
||||
with scopes_disabled():
|
||||
customer.provider = organizer.sso_providers.create(
|
||||
method="oidc",
|
||||
name="OIDC OP",
|
||||
configuration={}
|
||||
)
|
||||
customer.external_identifier = "123"
|
||||
customer.save()
|
||||
|
||||
resp = token_client.patch(
|
||||
'/api/v1/organizers/{}/customers/{}/'.format(organizer.slug, customer.identifier),
|
||||
format='json',
|
||||
data={
|
||||
'external_identifier': '234',
|
||||
}
|
||||
)
|
||||
assert resp.status_code == 200
|
||||
customer.refresh_from_db()
|
||||
assert customer.external_identifier == "123"
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_customer_anonymize(token_client, organizer, customer):
|
||||
resp = token_client.post(
|
||||
|
||||
Reference in New Issue
Block a user