plan(SP22): Task 4 review fix — client() fixture must enter async context

The verbatim plan returned an un-entered CycloneClient from the fixture,
causing all 3 tests to fail with 'use async with CycloneClient(...)'.
Convert fixture to async generator that enters the context. Verified by
running pytest tests/test_api_client.py -v → 3 passed.
This commit is contained in:
Tyler
2026-06-21 13:37:55 -06:00
parent d7f37f845a
commit 73be586110
@@ -645,8 +645,9 @@ from cyclone_pipeline.api_client import CycloneClient, HealthSnapshot, Scheduler
@pytest.fixture @pytest.fixture
def client(): async def client():
return CycloneClient(api_base="http://test:8000") async with CycloneClient(api_base="http://test:8000") as c:
yield c
@pytest.mark.asyncio @pytest.mark.asyncio