Home / Function/ test_route_decorator_custom_endpoint() — flask Function Reference

test_route_decorator_custom_endpoint() — flask Function Reference

Architecture documentation for the test_route_decorator_custom_endpoint() function in test_basic.py from the flask codebase.

Entity Profile

Dependency Diagram

graph TD
  b1480abe_481c_eda8_2804_8d9ff6e23d48["test_route_decorator_custom_endpoint()"]
  85bc4fb5_d1d7_a135_020d_69e052c12c0f["test_basic.py"]
  b1480abe_481c_eda8_2804_8d9ff6e23d48 -->|defined in| 85bc4fb5_d1d7_a135_020d_69e052c12c0f
  style b1480abe_481c_eda8_2804_8d9ff6e23d48 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_basic.py lines 1718–1740

def test_route_decorator_custom_endpoint(app, client):
    app.debug = True

    @app.route("/foo/")
    def foo():
        return flask.request.endpoint

    @app.route("/bar/", endpoint="bar")
    def for_bar():
        return flask.request.endpoint

    @app.route("/bar/123", endpoint="123")
    def for_bar_foo():
        return flask.request.endpoint

    with app.test_request_context():
        assert flask.url_for("foo") == "/foo/"
        assert flask.url_for("bar") == "/bar/"
        assert flask.url_for("123") == "/bar/123"

    assert client.get("/foo/").data == b"foo"
    assert client.get("/bar/").data == b"bar"
    assert client.get("/bar/123").data == b"123"

Subdomains

Defined In

Frequently Asked Questions

What does test_route_decorator_custom_endpoint() do?
test_route_decorator_custom_endpoint() is a function in the flask codebase, defined in tests/test_basic.py.
Where is test_route_decorator_custom_endpoint() defined?
test_route_decorator_custom_endpoint() is defined in tests/test_basic.py at line 1718.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free