From 91e28216e4be9bb87ca047942626acb2c7df6697 Mon Sep 17 00:00:00 2001 From: demo-bot Date: Sun, 9 Aug 2026 16:06:36 +0000 Subject: [PATCH] decomposer: scaffold crucible-agent-build-fastapi-endpoint --- tests/conftest.py | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 3343fde..4016ff0 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,24 +1 @@ -from collections.abc import AsyncIterator, Awaitable, Callable - -import httpx -import pytest -from httpx import ASGITransport, AsyncClient - -from app.checker import EndpointChecker -from app.main import app - - -@pytest.fixture -async def api_client() -> AsyncIterator[AsyncClient]: - async with app.router.lifespan_context(app): - async with AsyncClient(transport=ASGITransport(app=app), base_url="http://test") as client: - yield client - - -async def public_resolver(host: str, port: int) -> list[str]: - return ["93.184.216.34"] - - -def install_checker(handler: Callable[[httpx.Request], httpx.Response], resolver: Callable[[str, int], Awaitable[list[str]]] = public_resolver) -> None: - client = httpx.AsyncClient(transport=httpx.MockTransport(handler)) - app.state.checker = EndpointChecker(client, timeout=1, max_redirects=2, max_response_bytes=1024, resolver=resolver) +# Env var setup that must run before app.config is imported.