MCPcopy Create free account
hub / github.com/pallets/flask / test_url_generation

Function test_url_generation

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

Source from the content-addressed store, hash-verified

1330
1331
1332def test_url_generation(app, req_ctx):
1333 @app.route("/hello/<name>", methods=["POST"])
1334 def hello():
1335 pass
1336
1337 assert flask.url_for("hello", name="test x") == "/hello/test%20x"
1338 assert (
1339 flask.url_for("hello", name="test x", _external=True)
1340 == "http://localhost/hello/test%20x"
1341 )
1342
1343
1344def test_build_error_handler(app):

Callers

nothing calls this directly

Calls 1

url_forMethod · 0.80

Tested by

no test coverage detected