MCPcopy Create free account
hub / github.com/aio-libs/aiohttp / test_client

Function test_client

tests/test_test_utils.py:79–89  ·  view source on GitHub ↗
(
    loop: asyncio.AbstractEventLoop, app: web.Application
)

Source from the content-addressed store, hash-verified

77
78@pytest.fixture
79def test_client(
80 loop: asyncio.AbstractEventLoop, app: web.Application
81) -> Iterator[_TestClient]:
82 async def make_client() -> TestClient[web.Request, web.Application]:
83 return TestClient(TestServer(app))
84
85 client = loop.run_until_complete(make_client())
86
87 loop.run_until_complete(client.start_server())
88 yield client
89 loop.run_until_complete(client.close())
90
91
92def test_with_test_server_fails(loop) -> None:

Callers

nothing calls this directly

Calls 3

make_clientFunction · 0.85
start_serverMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected