MCPcopy Index your code
hub / github.com/pallets/flask / test_endpoint_decorator

Function test_endpoint_decorator

tests/test_basic.py:216–233  ·  view source on GitHub ↗
(app, client)

Source from the content-addressed store, hash-verified

214
215
216def test_endpoint_decorator(app, client):
217 from werkzeug.routing import Rule
218 from werkzeug.routing import Submount
219
220 app.url_map.add(
221 Submount("/foo", [Rule("/bar", endpoint="bar"), Rule("/", endpoint="index")])
222 )
223
224 @app.endpoint("bar")
225 def bar():
226 return "bar"
227
228 @app.endpoint("index")
229 def index():
230 return "index"
231
232 assert client.get("/foo/").data == b"index"
233 assert client.get("/foo/bar").data == b"bar"
234
235
236def test_session_accessed(app: flask.Flask, client: FlaskClient) -> None:

Callers

nothing calls this directly

Calls 2

addMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…