Add testmode for gift cards

This commit is contained in:
Raphael Michel
2019-10-17 18:05:04 +02:00
parent 302966808e
commit 4b2f25ce8a
14 changed files with 62 additions and 7 deletions

View File

@@ -18,6 +18,7 @@ TEST_GC_RES = {
"id": 1,
"secret": "ABCDEF",
"value": "23.00",
"testmode": False,
"currency": "EUR"
}
@@ -46,6 +47,7 @@ def test_giftcard_detail(token_client, organizer, event, giftcard):
TEST_GIFTCARD_CREATE_PAYLOAD = {
"secret": "DEFABC",
"value": "12.00",
"testmode": False,
"currency": "EUR",
}
@@ -84,6 +86,7 @@ def test_giftcard_patch(token_client, organizer, event, giftcard):
{
'secret': 'foo',
'value': '10.00',
'testmode': True,
'currency': 'USD'
},
format='json'
@@ -93,6 +96,7 @@ def test_giftcard_patch(token_client, organizer, event, giftcard):
assert giftcard.value == Decimal('10.00')
assert giftcard.secret == "ABCDEF"
assert giftcard.currency == "EUR"
assert not giftcard.testmode
@pytest.mark.django_db