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

Function test_dotted_names_from_app

tests/test_blueprints.py:264–278  ·  view source on GitHub ↗
(app, client)

Source from the content-addressed store, hash-verified

262
263
264def test_dotted_names_from_app(app, client):
265 test = flask.Blueprint("test", __name__)
266
267 @app.route("/")
268 def app_index():
269 return flask.url_for("test.index")
270
271 @test.route("/test/")
272 def index():
273 return flask.url_for("app_index")
274
275 app.register_blueprint(test)
276
277 rv = client.get("/")
278 assert rv.data == b"/test/"
279
280
281def test_empty_url_defaults(app, client):

Callers

nothing calls this directly

Calls 2

register_blueprintMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected