Create and start an HTTP test server.
(unused_tcp_port_factory: Callable[[], int])
| 162 | |
| 163 | @pytest.fixture(scope='session') |
| 164 | def http_server(unused_tcp_port_factory: Callable[[], int]) -> Iterator[TestServer]: |
| 165 | """Create and start an HTTP test server.""" |
| 166 | config = Config(app=app, lifespan='off', loop='asyncio', port=unused_tcp_port_factory()) |
| 167 | server = TestServer(config=config) |
| 168 | yield from serve_in_thread(server) |
| 169 | |
| 170 | |
| 171 | @pytest.fixture(scope='session') |
nothing calls this directly
no test coverage detected