def test_authorize_saved_card_auth(self): self.client._customer.auth.return_value = TRANSACTION_RESULT saved = AuthorizeSavedCard(self.client, '1|2') result = saved.auth(10) self.assertEqual(self.client._customer.auth.call_args, (('1', '2', 10), {})) self.assertTrue(isinstance(result, AuthorizeTransaction)) self.assertEqual(result.uid, '2171062816')
def test_authorize_saved_card_auth(self): self.client._customer.auth.return_value = TRANSACTION_RESULT saved = AuthorizeSavedCard(self.client, '1|2') result = saved.auth(10) self.assertEqual(self.client._customer.auth.call_args, (('1', '2', 10, None), {'purchase_order_number':None, 'description':None, 'invoice_number':None})) self.assertTrue(isinstance(result, AuthorizeTransaction)) self.assertEqual(result.uid, '2171062816')