File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -257,6 +257,22 @@ def test_merchant_no_bank_account(self):
257
257
the_exception = exc .exception
258
258
self .assertEqual (the_exception .status_code , 409 )
259
259
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
+
260
276
def test_add_funding_destination_to_nonmerchant (self ):
261
277
mp = balanced .Marketplace .query .one ()
262
278
card_payload = dict (self .us_card_payload )
You can’t perform that action at this time.
0 commit comments