(app, client)
| 343 | |
| 344 | |
| 345 | def test_endpoint_decorator(app, client): |
| 346 | from werkzeug.routing import Rule |
| 347 | |
| 348 | app.url_map.add(Rule("/foo", endpoint="bar")) |
| 349 | |
| 350 | bp = flask.Blueprint("bp", __name__) |
| 351 | |
| 352 | @bp.endpoint("bar") |
| 353 | def foobar(): |
| 354 | return flask.request.endpoint |
| 355 | |
| 356 | app.register_blueprint(bp, url_prefix="/bp_prefix") |
| 357 | |
| 358 | assert client.get("/foo").data == b"bar" |
| 359 | assert client.get("/bp_prefix/bar").status_code == 404 |
| 360 | |
| 361 | |
| 362 | def test_template_filter(app): |
nothing calls this directly
no test coverage detected