def test_issue_sila_instant_ach_403_max_amount(self): descriptor = "test descriptor" payload = { "user_handle": instant_ach_handle, "amount": 5001, "account_name": "default_plaid", "descriptor": descriptor, "business_uuid": business_uuid, "processing_type": ProcessingTypes.INSTANT_ACH } with self.assertWarns(DeprecationWarning): response = Transaction.issueSila(app, payload, eth_private_key_4) self.assertEqual(response["status"], "FAILURE") self.assertEqual(response["error_code"], "INSTANT_ACH_MAX_AMOUNT")
def test_issue_sila_200_deprecated(self): descriptor = "test descriptor" payload = { "user_handle": user_handle, "amount": 200, "account_name": "default_plaid", "descriptor": descriptor, "business_uuid": business_uuid, "processing_type": ProcessingTypes.STANDARD_ACH } with self.assertWarns(DeprecationWarning): response = Transaction.issueSila(app, payload, eth_private_key) self.assertEqual(response.get("success"), True) poll(self, response["transaction_id"], "success", app, user_handle, eth_private_key) self.assertEqual(response["status"], "SUCCESS") self.assertEqual(response["descriptor"], descriptor) self.assertIsNotNone(response["transaction_id"])
def test_cancel_transaction_200(self): payload = { "user_handle": user_handle, "amount": 200, "account_name": "default_plaid", "descriptor": "test descriptor", "business_uuid": business_uuid, "processing_type": ProcessingTypes.STANDARD_ACH } response = Transaction.issueSila(app, payload, eth_private_key) payload = { "user_handle": user_handle, "transaction_id": response["transaction_id"] } response = Transaction.cancelTransaction( app, payload, eth_private_key) self.assertIsNotNone(response["message"]) self.assertIsNotNone(response["reference"])