From 3f93b17603b121d513a4dc4e1888b6e3e51f8da8 Mon Sep 17 00:00:00 2001 From: Pedro Crespo-Valero <32402063+pcrespov@users.noreply.github.com> Date: Thu, 28 Nov 2024 18:30:53 +0100 Subject: [PATCH] fixes --- services/payments/tests/unit/test_services_payments_gateway.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/payments/tests/unit/test_services_payments_gateway.py b/services/payments/tests/unit/test_services_payments_gateway.py index c2ba73f4f9a..37350508929 100644 --- a/services/payments/tests/unit/test_services_payments_gateway.py +++ b/services/payments/tests/unit/test_services_payments_gateway.py @@ -8,6 +8,7 @@ import pytest from faker import Faker from fastapi import FastAPI, status +from httpx import ASGITransport from models_library.payments import UserInvoiceAddress from pytest_simcore.helpers.monkeypatch_envs import EnvVarsDict, setenvs_from_dict from respx import MockRouter @@ -218,7 +219,7 @@ async def test_payments_gateway_error_exception(): async def _go(): with _raise_as_payments_gateway_error(operation_id="foo"): async with httpx.AsyncClient( - app=FastAPI(), + transport=ASGITransport(app=FastAPI()), base_url="http://payments.testserver.io", ) as client: response = await client.post("/foo", params={"x": "3"}, json={"y": 12})