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

Function test_host_repr

tests/test_routing.py:1067–1077  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1065
1066
1067def test_host_repr() -> None:
1068 route = Host(
1069 "example.com",
1070 app=Router(
1071 [
1072 Route("/", endpoint=homepage),
1073 ]
1074 ),
1075 )
1076 # test for substring because repr(Router) returns unique object ID
1077 assert repr(route).startswith("Host(host='example.com', name='', app=")
1078
1079
1080def test_host_named_repr() -> None:

Callers

nothing calls this directly

Calls 3

HostClass · 0.90
RouterClass · 0.90
RouteClass · 0.90

Tested by

no test coverage detected