Home / Function/ test_subdomain_matching() — flask Function Reference

test_subdomain_matching() — flask Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  8e1c8d85_352e_43b5_3a51_b8742f11a851["test_subdomain_matching()"]
  85bc4fb5_d1d7_a135_020d_69e052c12c0f["test_basic.py"]
  8e1c8d85_352e_43b5_3a51_b8742f11a851 -->|defined in| 85bc4fb5_d1d7_a135_020d_69e052c12c0f
  6ea1611d_2801_3cb5_a5b9_5b6403cc0537["index()"]
  8e1c8d85_352e_43b5_3a51_b8742f11a851 -->|calls| 6ea1611d_2801_3cb5_a5b9_5b6403cc0537
  style 8e1c8d85_352e_43b5_3a51_b8742f11a851 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_basic.py lines 1779–1789

def test_subdomain_matching():
    app = flask.Flask(__name__, subdomain_matching=True)
    client = app.test_client()
    app.config["SERVER_NAME"] = "localhost.localdomain"

    @app.route("/", subdomain="<user>")
    def index(user):
        return f"index for {user}"

    rv = client.get("/", "http://mitsuhiko.localhost.localdomain/")
    assert rv.data == b"index for mitsuhiko"

Subdomains

Defined In

Calls

Frequently Asked Questions

What does test_subdomain_matching() do?
test_subdomain_matching() is a function in the flask codebase, defined in tests/test_basic.py.
Where is test_subdomain_matching() defined?
test_subdomain_matching() is defined in tests/test_basic.py at line 1779.
What does test_subdomain_matching() call?
test_subdomain_matching() calls 1 function(s): index.

Analyze Your Own Codebase

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

Try Supermodel Free