Properly restrict refunds to full payment amount

This commit is contained in:
Raphael Michel
2018-09-03 15:41:05 +02:00
parent 7274905a92
commit 21530f315f
6 changed files with 27 additions and 12 deletions

View File

@@ -1402,7 +1402,10 @@ def test_refund_paid_order_automatically(client, env, monkeypatch):
def charge_retr(*args, **kwargs):
def refund_create(amount):
pass
r = MockedCharge()
r.id = 'foo'
r.status = 'succeeded'
return r
c = MockedCharge()
c.refunds.create = refund_create