fix: add test for #176

This commit is contained in:
David Soria Parra
2025-01-28 11:19:13 +00:00
parent 76325b7846
commit 2dc5fbfa3d
2 changed files with 47 additions and 1 deletions

View File

@@ -164,6 +164,7 @@ async def http_client(server, server_url) -> AsyncGenerator[httpx.AsyncClient, N
async def test_raw_sse_connection(http_client: httpx.AsyncClient) -> None:
"""Test the SSE connection establishment simply with an HTTP client."""
async with anyio.create_task_group():
async def connection_test() -> None:
async with http_client.stream("GET", "/sse") as response:
assert response.status_code == 200
@@ -211,7 +212,6 @@ async def initialized_sse_client_session(
yield session
@pytest.mark.anyio
async def test_sse_client_happy_request_and_response(
initialized_sse_client_session: ClientSession,