10000 test using a card on a merchant with a removed bank account · balanced/balanced-python@4989281 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4989281

Browse files
author
Marc Sherry
committed
test using a card on a merchant with a removed bank account
1 parent 62514f2 commit 4989281

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/acceptance_suite.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,22 @@ def test_merchant_no_bank_account(self):
257257
the_exception = exc.exception
258258
self.assertEqual(the_exception.status_code, 409)
259259

260+
# try to debit
261+
with self.assertRaises(requests.HTTPError) as exc:
262+
merchant.debit(600)
263+
the_exception = exc.exception
264+
self.assertEqual(the_exception.status_code, 409)
265+
266+
# add a card, make sure we can use it
267+
card_payload = dict(self.us_card_payload)
268+
card = balanced.Card(**card_payload).save()
269+
card_uri = card.uri
270+
merchant.add_card(card_uri=card_uri)
271+
272+
# try to debit again
273+
debit = merchant.debit(601)
274+
self.assertEqual(debit.source.id, card.id)
275+
260276
def test_add_funding_destination_to_nonmerchant(self):
261277
mp = balanced.Marketplace.query.one()
262278
card_payload = dict(self.us_card_payload)

0 commit comments

Comments
 (0)
0