mirror of
https://github.com/pretix/pretix.git
synced 2026-05-03 14:54:04 +00:00
Add new gift card to orderposition relationship (#3291)
This commit is contained in:
@@ -121,9 +121,14 @@ def test_medium_detail(token_client, organizer, event, medium, giftcard, custome
|
||||
medium.linked_giftcard = giftcard
|
||||
medium.customer = customer
|
||||
medium.save()
|
||||
giftcard.owner_ticket = op
|
||||
giftcard.save()
|
||||
resp = token_client.get(
|
||||
'/api/v1/organizers/{}/reusablemedia/{}/?expand=linked_giftcard&expand=linked_orderposition&expand=customer'.format(
|
||||
organizer.slug, medium.pk))
|
||||
'/api/v1/organizers/{}/reusablemedia/{}/?expand=linked_giftcard&expand='
|
||||
'linked_giftcard.owner_ticket&expand=linked_orderposition&expand=customer'.format(
|
||||
organizer.slug, medium.pk
|
||||
)
|
||||
)
|
||||
assert resp.status_code == 200
|
||||
|
||||
assert resp.data["customer"] == {
|
||||
@@ -183,7 +188,8 @@ def test_medium_detail(token_client, organizer, event, medium, giftcard, custome
|
||||
"currency": "EUR",
|
||||
"testmode": False,
|
||||
"expires": None,
|
||||
"conditions": None
|
||||
"conditions": None,
|
||||
"owner_ticket": resp.data["linked_orderposition"],
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user