From ad99e4d66aada7865b3d1573570f3d025a65956a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Voron?= Date: Sun, 3 Nov 2024 12:56:54 +0000 Subject: [PATCH] Fix depreciation warnings --- pyproject.toml | 1 + tests/conftest.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6d5ec89b..03b3539d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,6 +20,7 @@ ignore_missing_imports = true [tool.pytest.ini_options] asyncio_mode = "auto" addopts = "--ignore=test_build.py" +asyncio_default_fixture_loop_scope = "session" markers = [ "authentication", "db", diff --git a/tests/conftest.py b/tests/conftest.py index d780fc27..d7e47ecf 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -546,7 +546,7 @@ def get_test_client(): async def _get_test_client(app: FastAPI) -> AsyncGenerator[httpx.AsyncClient, None]: async with LifespanManager(app): async with httpx.AsyncClient( - app=app, base_url="http://app.io" + transport=httpx.ASGITransport(app), base_url="http://app.io" ) as test_client: yield test_client