async def test_test_client_raw_server_props(loop) -> None: async def hello(request): return web.Response(body=_hello_world_bytes) client = _TestClient(_RawTestServer(hello, host='127.0.0.1', loop=loop), loop=loop) assert client.host == '127.0.0.1' assert client.port is None async with client: assert isinstance(client.port, int) assert client.server is not None assert client.app is None assert client.port is None
async def test_test_client_raw_server_props(loop): async def hello(request): return web.Response(body=_hello_world_bytes) client = _TestClient(_RawTestServer(hello, host='127.0.0.1', loop=loop), loop=loop) assert client.host == '127.0.0.1' assert client.port is None async with client: assert isinstance(client.port, int) assert client.server is not None assert client.app is None assert client.port is None
async def test_test_client_raw_server_props() -> None: async def hello(request): return web.Response(body=_hello_world_bytes) server = _RawTestServer(hello, scheme="http", host="127.0.0.1") client = _TestClient(server) assert client.scheme == "http" assert client.host == "127.0.0.1" assert client.port is None async with client: assert isinstance(client.port, int) assert client.server is not None assert client.app is None assert client.port is None