forked from dj-stripe/dj-stripe
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Also updated existing tests according to changes made in the application code.
- Loading branch information
1 parent
fd0e433
commit 1672e27
Showing
9 changed files
with
547 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1604,7 +1604,7 @@ def pay(self): | |
"created": 1439185846, | ||
"currency": "usd", | ||
"description": "Test description - 1439185984", | ||
"destination": "acct_16Y9B9Fso9hLaeLu", | ||
"destination": FAKE_STANDARD_ACCOUNT["id"], | ||
"destination_payment": "py_16Y9BKFso9hLaeLueFmWAYUi", | ||
"livemode": False, | ||
"metadata": {}, | ||
|
@@ -1621,60 +1621,73 @@ def pay(self): | |
"source_type": "bank_account", | ||
} | ||
|
||
FAKE_TRANSFER_II = { | ||
"id": "tr_16hTzv2eZvKYlo2CWuyMmuvV", | ||
FAKE_TRANSFER_WITH_1_REVERSAL = { | ||
"id": "tr_16Y9BK2eZvKYlo2CR0ySu1BA", | ||
"object": "transfer", | ||
"amount": 2000, | ||
"amount": 100, | ||
"amount_reversed": 0, | ||
"application_fee_amount": None, | ||
"balance_transaction": deepcopy(FAKE_BALANCE_TRANSACTION_III), | ||
"bank_account": deepcopy(FAKE_BANK_ACCOUNT), | ||
"created": 1440420000, | ||
"balance_transaction": deepcopy(FAKE_BALANCE_TRANSACTION_II), | ||
"created": 1439185846, | ||
"currency": "usd", | ||
"description": None, | ||
"destination": "ba_16hTzo2eZvKYlo2CeSjfb0tS", | ||
"description": "Test description - 1439185984", | ||
"destination": FAKE_STANDARD_ACCOUNT["id"], | ||
"destination_payment": "py_16Y9BKFso9hLaeLueFmWAYUi", | ||
"livemode": False, | ||
"metadata": {"foo": "bar"}, | ||
"recipient": "rp_16hTzu2eZvKYlo2C9A5mgxEj", | ||
"metadata": {}, | ||
"recipient": None, | ||
"reversals": { | ||
"object": "list", | ||
"total_count": 0, | ||
"total_count": 1, | ||
"has_more": False, | ||
"url": "/v1/transfers/tr_16hTzv2eZvKYlo2CWuyMmuvV/reversals", | ||
"data": [], | ||
"url": "/v1/transfers/tr_16Y9BK2eZvKYlo2CR0ySu1BA/reversals", | ||
"data": [ | ||
{ | ||
"id": "trr_1J5UlFJSZQVUcJYgb38m1OZO", | ||
"object": "transfer_reversal", | ||
"amount": 20, | ||
"balance_transaction": deepcopy(FAKE_BALANCE_TRANSACTION_II), | ||
"created": 1624449653, | ||
"currency": "usd", | ||
"destination_payment_refund": "pyr_1J5UlFR44xKqawmIBvFa6gW9", | ||
"metadata": {}, | ||
"source_refund": None, | ||
"transfer": deepcopy(FAKE_TRANSFER), | ||
} | ||
], | ||
}, | ||
"reversed": False, | ||
"source_transaction": None, | ||
"source_type": "card", | ||
"source_type": "bank_account", | ||
} | ||
|
||
FAKE_TRANSFER_III = { | ||
"id": "tr_17O4U52eZvKYlo2CmyYbDAEy", | ||
"object": "transfer", | ||
"amount": 19010, | ||
"amount_reversed": 0, | ||
"application_fee_amount": None, | ||
"balance_transaction": deepcopy(FAKE_BALANCE_TRANSACTION_IV), | ||
"bank_account": deepcopy(FAKE_BANK_ACCOUNT_II), | ||
"created": 1451560845, | ||
"currency": "usd", | ||
"date": 1451560845, | ||
"description": "[email protected]", | ||
"destination": "ba_17O4Tz2eZvKYlo2CMYsxroV5", | ||
"livemode": False, | ||
"metadata": {"foo2": "bar2"}, | ||
"recipient": "rp_17O4U42eZvKYlo2CLk4upfDE", | ||
"reversals": { | ||
"object": "list", | ||
"total_count": 0, | ||
"has_more": False, | ||
"url": "/v1/transfers/tr_17O4U52eZvKYlo2CmyYbDAEy/reversals", | ||
"data": [], | ||
}, | ||
"reversed": False, | ||
"source_transaction": None, | ||
"source_type": "card", | ||
} | ||
# FAKE_TRANSFER_III = { | ||
# "id": "tr_17O4U52eZvKYlo2CmyYbDAEy", | ||
# "object": "transfer", | ||
# "amount": 19010, | ||
# "amount_reversed": 0, | ||
# "application_fee_amount": None, | ||
# "balance_transaction": deepcopy(FAKE_BALANCE_TRANSACTION_IV), | ||
# "bank_account": deepcopy(FAKE_BANK_ACCOUNT_II), | ||
# "created": 1451560845, | ||
# "currency": "usd", | ||
# "date": 1451560845, | ||
# "description": "[email protected]", | ||
# "destination": "ba_17O4Tz2eZvKYlo2CMYsxroV5", | ||
# "livemode": False, | ||
# "metadata": {"foo2": "bar2"}, | ||
# "recipient": "rp_17O4U42eZvKYlo2CLk4upfDE", | ||
# "reversals": { | ||
# "object": "list", | ||
# "total_count": 0, | ||
# "has_more": False, | ||
# "url": "/v1/transfers/tr_17O4U52eZvKYlo2CmyYbDAEy/reversals", | ||
# "data": [], | ||
# }, | ||
# "reversed": False, | ||
# "source_transaction": None, | ||
# "source_type": "card", | ||
# } | ||
|
||
FAKE_ACCOUNT = { | ||
"id": "acct_1032D82eZvKYlo2C", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.