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

Function test_host_named_repr

tests/test_routing.py:1080–1091  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1078
1079
1080def test_host_named_repr() -> None:
1081 route = Host(
1082 "example.com",
1083 name="app",
1084 app=Router(
1085 [
1086 Route("/", endpoint=homepage),
1087 ]
1088 ),
1089 )
1090 # test for substring because repr(Router) returns unique object ID
1091 assert repr(route).startswith("Host(host='example.com', name='app', app=")
1092
1093
1094async def echo_paths(request: Request, name: str) -> JSONResponse:

Callers

nothing calls this directly

Calls 3

HostClass · 0.90
RouterClass · 0.90
RouteClass · 0.90

Tested by

no test coverage detected