()
| 477 | |
| 478 | |
| 479 | def test_host_reverse_urls() -> None: |
| 480 | assert mixed_hosts_app.url_path_for("homepage").make_absolute_url("https://whatever") == "https://www.example.org/" |
| 481 | assert ( |
| 482 | mixed_hosts_app.url_path_for("users").make_absolute_url("https://whatever") == "https://www.example.org/users" |
| 483 | ) |
| 484 | assert ( |
| 485 | mixed_hosts_app.url_path_for("api:users").make_absolute_url("https://whatever") |
| 486 | == "https://api.example.org/users" |
| 487 | ) |
| 488 | assert ( |
| 489 | mixed_hosts_app.url_path_for("port:homepage").make_absolute_url("https://whatever") |
| 490 | == "https://port.example.org:3600/" |
| 491 | ) |
| 492 | with pytest.raises(NoMatchFound): |
| 493 | mixed_hosts_app.url_path_for("api", path="whatever", foo="bar") |
| 494 | |
| 495 | |
| 496 | async def subdomain_app(scope: Scope, receive: Receive, send: Send) -> None: |
nothing calls this directly
no test coverage detected