Skip to content

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

Fix invalid adyen mock (#14004)

Tomasz Szymański1c627fad2c12
diff --git a/saleor/payment/gateways/adyen/tests/conftest.py b/saleor/payment/gateways/adyen/tests/conftest.py
index 7ad9de1692..a5c44116e7 100644
--- a/saleor/payment/gateways/adyen/tests/conftest.py
+++ b/saleor/payment/gateways/adyen/tests/conftest.py
@@ -3,6 +3,7 @@ from unittest import mock
import Adyen
import pytest
+from requests_hardened import HTTPSession
from .....checkout import calculations
from .....checkout.fetch import fetch_checkout_info, fetch_checkout_lines
@@ -42,7 +43,7 @@ def adyen_plugin(settings, channel_USD):
settings.PLUGINS = ["saleor.payment.gateways.adyen.plugin.AdyenGatewayPlugin"]
manager = get_plugins_manager()
- with mock.patch("saleor.payment.gateways.adyen.utils.apple_pay.requests.post"):
+ with mock.patch.object(HTTPSession, "request"):
manager.save_plugin_configuration(
AdyenGatewayPlugin.PLUGIN_ID,
channel_USD.slug,