diff --git a/services/autoscaling/tests/unit/conftest.py b/services/autoscaling/tests/unit/conftest.py index c0d89ff995a..eccee9967b5 100644 --- a/services/autoscaling/tests/unit/conftest.py +++ b/services/autoscaling/tests/unit/conftest.py @@ -419,7 +419,7 @@ def service_monitored_labels( @pytest.fixture async def async_client(initialized_app: FastAPI) -> AsyncIterator[httpx.AsyncClient]: async with httpx.AsyncClient( - app=initialized_app, + transport=httpx.ASGITransport(app=initialized_app), base_url=f"http://{initialized_app.title}.testserver.io", headers={"Content-Type": "application/json"}, ) as client: diff --git a/services/clusters-keeper/tests/unit/conftest.py b/services/clusters-keeper/tests/unit/conftest.py index 432d743fb0c..890968f4d83 100644 --- a/services/clusters-keeper/tests/unit/conftest.py +++ b/services/clusters-keeper/tests/unit/conftest.py @@ -262,7 +262,7 @@ def app_settings(initialized_app: FastAPI) -> ApplicationSettings: @pytest.fixture async def async_client(initialized_app: FastAPI) -> AsyncIterator[httpx.AsyncClient]: async with httpx.AsyncClient( - app=initialized_app, + transport=httpx.ASGITransport(app=initialized_app), base_url=f"http://{initialized_app.title}.testserver.io", headers={"Content-Type": "application/json"}, ) as client: