8000 test invalid funding sources/destinations · balanced/balanced-python@6a747c1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6a747c1

Browse files
author
Marc Sherry
committed
test invalid funding sources/destinations
1 parent 4989281 commit 6a747c1

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

tests/acceptance_suite.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,3 +333,24 @@ def test_update_stupid_values(self):
333333
the_exception = exc.exception
8000 334334
self.assertEqual(the_exception.status_code, 400)
335335
self.assertIn('must be <=', the_exception.description)
336+
337+
def test_zzz_remove_owner_merchant_account_bank_account(self):
338+
mp = balanced.Marketplace.query.one()
339+
owner = mp.owner_account
340+
ba = owner.bank_accounts[0]
341+
ba.is_valid = False
342+
ba.save()
343+
344+
with self.assertRaises(requests.HTTPError) as exc:
345+
owner.debit(600)
346+
the_exception = exc.exception
347+
self.assertEqual(the_exception.status_code, 409)
348+
self.assertEqual('funding-source-not-valid',
349+
the_exception.category_code)
350+
351+
with self.assertRaises(requests.HTTPError) as exc:
352+
owner.credit(900)
353+
the_exception = exc.exception
354+
self.assertEqual(the_exception.status_code, 409)
355+
self.assertEqual('funding-destination-not-valid',
356+
the_exception.category_code)

0 commit comments

Comments
 (0)
0