diff --git a/tests/conftest.py b/tests/conftest.py index 1a55a45..293f0f2 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -9,6 +9,6 @@ @pytest.fixture def app() -> web.Application: application = web.Application() - container = modern_di.Container(groups=[Dependencies]) + container = modern_di.Container(groups=[Dependencies], validate=True) setup_di(application, container) return application diff --git a/tests/test_lifespan.py b/tests/test_lifespan.py index a392fb8..91fc36b 100644 --- a/tests/test_lifespan.py +++ b/tests/test_lifespan.py @@ -18,7 +18,7 @@ async def _ok(request: web.Request) -> web.Response: # noqa: ARG001 async def test_startup_reopens_closed_root(aiohttp_client: AiohttpClient) -> None: - container = modern_di.Container(groups=[Dependencies]) + container = modern_di.Container(groups=[Dependencies], validate=True) container.close_sync() assert container.closed @@ -34,7 +34,7 @@ async def test_startup_reopens_closed_root(aiohttp_client: AiohttpClient) -> Non async def test_cleanup_closes_root() -> None: app = web.Application() - container = modern_di.Container(groups=[Dependencies]) + container = modern_di.Container(groups=[Dependencies], validate=True) setup_di(app, container) await _on_startup(app)