MCPcopy
hub / github.com/encode/starlette / test_client_factory

Function test_client_factory

tests/conftest.py:13–23  ·  tests/conftest.py::test_client_factory
(
    anyio_backend_name: Literal["asyncio", "trio"],
    anyio_backend_options: dict[str, Any],
)

Source from the content-addressed store, hash-verified

11
12@pytest.fixture
13def test_client_factory(
14 anyio_backend_name: Literal[class="st">"asyncio", class="st">"trio"],
15 anyio_backend_options: dict[str, Any],
16) -> TestClientFactory:
17 class="cm"># anyio_backend_name defined by:
18 class="cm"># https://anyio.readthedocs.io/en/stable/testing.html#specifying-the-backends-to-run-on
19 return functools.partial(
20 TestClient,
21 backend=anyio_backend_name,
22 backend_options=anyio_backend_options,
23 )

Callers 15

test_request_urlFunction · 0.85
test_request_headersFunction · 0.85
test_request_bodyFunction · 0.85
test_request_streamFunction · 0.85
test_request_jsonFunction · 0.85
test_request_raw_pathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected