()
| 273 | |
| 274 | |
| 275 | def test_url_for() -> None: |
| 276 | assert app.url_path_for("homepage").make_absolute_url(base_url="https://example.org") == "https://example.org/" |
| 277 | assert ( |
| 278 | app.url_path_for("homepage").make_absolute_url(base_url="https://example.org/root_path/") |
| 279 | == "https://example.org/root_path/" |
| 280 | ) |
| 281 | assert ( |
| 282 | app.url_path_for("user", username="tomchristie").make_absolute_url(base_url="https://example.org") |
| 283 | == "https://example.org/users/tomchristie" |
| 284 | ) |
| 285 | assert ( |
| 286 | app.url_path_for("user", username="tomchristie").make_absolute_url(base_url="https://example.org/root_path/") |
| 287 | == "https://example.org/root_path/users/tomchristie" |
| 288 | ) |
| 289 | assert ( |
| 290 | app.url_path_for("websocket_endpoint").make_absolute_url(base_url="https://example.org") |
| 291 | == "wss://example.org/ws" |
| 292 | ) |
| 293 | |
| 294 | |
| 295 | def test_router_add_route(client: TestClient) -> None: |
nothing calls this directly
no test coverage detected