MCPcopy
hub / github.com/pallets/flask / test_url_generation

Function test_url_generation

tests/test_basic.py:1360–1369  ·  view source on GitHub ↗
(app, req_ctx)

Source from the content-addressed store, hash-verified

1358
1359
1360def test_url_generation(app, req_ctx):
1361 @app.route("/hello/<name>", methods=["POST"])
1362 def hello():
1363 pass
1364
1365 assert flask.url_for("hello", name="test x") == "/hello/test%20x"
1366 assert (
1367 flask.url_for("hello", name="test x", _external=True)
1368 == "http://localhost/hello/test%20x"
1369 )
1370
1371
1372def test_build_error_handler(app):

Callers

nothing calls this directly

Calls 1

url_forMethod · 0.80

Tested by

no test coverage detected