()
| 1078 | |
| 1079 | |
| 1080 | def 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 | |
| 1094 | async def echo_paths(request: Request, name: str) -> JSONResponse: |