コード例 #1
0
 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')
コード例 #2
0
 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')
コード例 #3
0
 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')