Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Update test_payment_capture_gateway_error test
IKarbowiak6b1b92d67952
diff --git a/saleor/graphql/payment/tests/test_payment.py b/saleor/graphql/payment/tests/test_payment.pyindex 31ec4e4f3c..037c41a753 100644--- a/saleor/graphql/payment/tests/test_payment.py+++ b/saleor/graphql/payment/tests/test_payment.py@@ -6,6 +6,7 @@ from django_countries.fields import Countryfrom ....checkout import calculationsfrom ....payment.error_codes import PaymentErrorCode+from ....payment.gateways.dummy import TOKEN_VALIDATION_MAPPINGfrom ....payment.interface import CreditCardInfo, CustomerSource, TokenConfigfrom ....payment.models import ChargeStatus, Payment, TransactionKindfrom ....payment.utils import fetch_customer_id, store_customer_id@@ -468,9 +469,10 @@ def test_payment_capture_with_payment_non_authorized_yet(def test_payment_capture_gateway_error(staff_api_client, permission_manage_orders, payment_txn_preauth, monkeypatch):+ token, error = list(TOKEN_VALIDATION_MAPPING.items())[0]payment = payment_txn_preauthtransaction = payment.transactions.last()- transaction.token = "4000000000000069"+ transaction.token = tokentransaction.save()assert payment.charge_status == ChargeStatus.NOT_CHARGED@@ -482,7 +484,7 @@ def test_payment_capture_gateway_error()content = get_graphql_content(response)data = content["data"]["paymentCapture"]- assert data["errors"] == [{"field": None, "message": "Card expired"}]+ assert data["errors"] == [{"field": None, "message": error}]payment_txn_preauth.refresh_from_db()assert payment.charge_status == ChargeStatus.NOT_CHARGED