GiftCard: Add more information to transactions (#3308)

This commit is contained in:
Raphael Michel
2023-05-12 09:38:35 +02:00
committed by GitHub
parent 916ee0697f
commit c0419518c3
19 changed files with 247 additions and 85 deletions

View File

@@ -44,7 +44,7 @@ def organizer2():
@pytest.fixture
def gift_card(organizer):
gc = organizer.issued_gift_cards.create(currency="EUR")
gc.transactions.create(value=42)
gc.transactions.create(value=42, acceptor=organizer)
return gc
@@ -140,7 +140,7 @@ def test_card_detail_view_transact_revert_refund(organizer, admin_user, gift_car
r = o.refunds.create(
amount=o.total, provider='giftcard', state=OrderRefund.REFUND_STATE_DONE
)
t = gift_card.transactions.create(value=14, order=o, refund=r)
t = gift_card.transactions.create(value=14, order=o, refund=r, acceptor=organizer)
client.login(email='dummy@dummy.dummy', password='dummy')
r = client.post('/control/organizer/dummy/giftcard/{}/'.format(gift_card.pk), {

View File

@@ -44,7 +44,7 @@ def medium(organizer):
@pytest.fixture
def gift_card(organizer):
gc = organizer.issued_gift_cards.create(currency="EUR")
gc.transactions.create(value=42)
gc.transactions.create(value=42, acceptor=organizer)
return gc