mirror of https://github.com/encode/starlette.git
17 lines
431 B
Python
17 lines
431 B
Python
import functools
|
|
|
|
import pytest
|
|
|
|
from starlette.testclient import TestClient
|
|
|
|
|
|
@pytest.fixture
|
|
def test_client_factory(anyio_backend_name, anyio_backend_options):
|
|
# anyio_backend_name defined by:
|
|
# https://anyio.readthedocs.io/en/stable/testing.html#specifying-the-backends-to-run-on
|
|
return functools.partial(
|
|
TestClient,
|
|
backend=anyio_backend_name,
|
|
backend_options=anyio_backend_options,
|
|
)
|