Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Fix failing test after merged branches related to adyen (#6355)

Maciej Korycinskif616c7df7fa4
diff --git a/saleor/payment/gateways/adyen/tests/webhooks/test_get_payment.py b/saleor/payment/gateways/adyen/tests/webhooks/test_get_payment.py
index da3ef80275..915d50d50a 100644
--- a/saleor/payment/gateways/adyen/tests/webhooks/test_get_payment.py
+++ b/saleor/payment/gateways/adyen/tests/webhooks/test_get_payment.py
@@ -42,10 +42,15 @@ def test_get_payment_not_active_payment(payment_dummy, caplog):
payment_dummy.save(update_fields=["is_active"])
payment_id = graphene.Node.to_global_id("Payemnt", payment_dummy.pk)
+ transaction_id = "psp reference"
# when
- result = get_payment(payment_id)
+ result = get_payment(payment_id, transaction_id)
# then
+ expected_msg = (
+ f"Payment for {payment_id} ({payment_dummy.pk}) was not found. Reference "
+ f"{transaction_id}"
+ )
assert not result
- assert f"Payment for {payment_id} was not found." in caplog.text
+ assert expected_msg in caplog.text