def test_refund_transaction_fail(self): transaction = Transaction(api_key='apikey') transaction.find_by_id(314) with self.assertRaises(PagarmeApiError): transaction.refund()
def test_refund_transaction_before_set_id(self): transaction = Transaction(api_key='apikey') with self.assertRaises(NotPaidException): transaction.refund()
def test_refund_transaction(self): transaction = Transaction(api_key='apikey') transaction.find_by_id(314) transaction.refund() self.assertEqual('refunded', transaction.status)
def test_refund_transaction_fail(self): transaction = Transaction(api_key='apikey') transaction.find_by_id(314) with self.assertRaises(PagarmeApiError): transaction.refund()
def test_refund_transaction_before_set_id(self): transaction = Transaction(api_key='apikey') with self.assertRaises(NotPaidException): transaction.refund()
def test_refund_transaction(self): transaction = Transaction(api_key='apikey') transaction.find_by_id(314) transaction.refund() self.assertEqual('refunded', transaction.status)