MCPcopy Create free account
hub / github.com/encode/starlette / test_host_repr

Function test_host_repr

tests/test_routing.py:1125–1135  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1123
1124
1125def test_host_repr() -> None:
1126 route = Host(
1127 "example.com",
1128 app=Router(
1129 [
1130 Route("/", endpoint=homepage),
1131 ]
1132 ),
1133 )
1134 # test for substring because repr(Router) returns unique object ID
1135 assert repr(route).startswith("Host(host='example.com', name='', app=")
1136
1137
1138def 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