forked from CGM_Public/pretix_original
API: Add various filtering options
* API: Add various filtering options (#23158339) * fix query-param description * simplify payment provider qs-filter --------- Co-authored-by: Richard Schreiber <schreiber@rami.io>
This commit is contained in:
co-authored by
Richard Schreiber
parent
2aa989c293
commit
8d6d885f6e
@@ -86,6 +86,18 @@ def test_giftcard_list(token_client, organizer, event, giftcard, other_giftcard)
|
||||
assert resp.status_code == 200
|
||||
assert 2 == len(resp.data['results'])
|
||||
|
||||
resp = token_client.get('/api/v1/organizers/{}/giftcards/?expired=false'.format(organizer.slug))
|
||||
assert 1 == len(resp.data['results'])
|
||||
resp = token_client.get('/api/v1/organizers/{}/giftcards/?expired=true'.format(organizer.slug))
|
||||
assert 0 == len(resp.data['results'])
|
||||
|
||||
resp = token_client.get('/api/v1/organizers/{}/giftcards/?value=23.00'.format(organizer.slug))
|
||||
assert 1 == len(resp.data['results'])
|
||||
resp = token_client.get('/api/v1/organizers/{}/giftcards/?value=23'.format(organizer.slug))
|
||||
assert 1 == len(resp.data['results'])
|
||||
resp = token_client.get('/api/v1/organizers/{}/giftcards/?value=24'.format(organizer.slug))
|
||||
assert 0 == len(resp.data['results'])
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_giftcard_detail(token_client, organizer, event, giftcard):
|
||||
|
||||
Reference in New Issue
Block a user