Check-in API: Work around libpretixsync issue with space encoding

This commit is contained in:
Raphael Michel
2021-10-26 10:46:11 +02:00
parent 24eea02e0d
commit 2beb0b20ca
2 changed files with 20 additions and 1 deletions

View File

@@ -687,6 +687,19 @@ def test_by_secret_special_chars(token_client, organizer, clist, event, order):
assert resp.data['status'] == 'ok'
@pytest.mark.django_db
def test_by_secret_special_chars_space_fallback(token_client, organizer, clist, event, order):
with scopes_disabled():
p = order.positions.first()
p.secret = "foo bar"
p.save()
resp = token_client.post('/api/v1/organizers/{}/events/{}/checkinlists/{}/positions/{}/redeem/'.format(
organizer.slug, event.slug, clist.pk, "foo+bar"
), {}, format='json')
assert resp.status_code == 201
assert resp.data['status'] == 'ok'
@pytest.mark.django_db
def test_only_once(token_client, organizer, clist, event, order):
with scopes_disabled():