()
| 259 | |
| 260 | |
| 261 | def test_url_path_for() -> None: |
| 262 | assert app.url_path_for("homepage") == "/" |
| 263 | assert app.url_path_for("user", username="tomchristie") == "/users/tomchristie" |
| 264 | assert app.url_path_for("websocket_endpoint") == "/ws" |
| 265 | with pytest.raises(NoMatchFound, match='No route exists for name "broken" and params "".'): |
| 266 | assert app.url_path_for("broken") |
| 267 | with pytest.raises(NoMatchFound, match='No route exists for name "broken" and params "key, key2".'): |
| 268 | assert app.url_path_for("broken", key="value", key2="value2") |
| 269 | with pytest.raises(AssertionError): |
| 270 | app.url_path_for("user", username="tom/christie") |
| 271 | with pytest.raises(AssertionError): |
| 272 | app.url_path_for("user", username="") |
| 273 | |
| 274 | |
| 275 | def test_url_for() -> None: |
nothing calls this directly
no test coverage detected