Home / Function/ test_implicit_head() — flask Function Reference

test_implicit_head() — flask Function Reference

Architecture documentation for the test_implicit_head() function in test_views.py from the flask codebase.

Entity Profile

Dependency Diagram

graph TD
  8930ee78_7add_8785_b745_3f6d67884d4b["test_implicit_head()"]
  dc72c3f0_27a2_eeb5_19d5_19d3385508ed["test_views.py"]
  8930ee78_7add_8785_b745_3f6d67884d4b -->|defined in| dc72c3f0_27a2_eeb5_19d5_19d3385508ed
  54fd565b_afb7_a36e_8992_3543df40a5d9["head()"]
  8930ee78_7add_8785_b745_3f6d67884d4b -->|calls| 54fd565b_afb7_a36e_8992_3543df40a5d9
  4d3129d2_54db_e673_646a_eba9e00383fb["get()"]
  8930ee78_7add_8785_b745_3f6d67884d4b -->|calls| 4d3129d2_54db_e673_646a_eba9e00383fb
  style 8930ee78_7add_8785_b745_3f6d67884d4b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_views.py lines 141–152

def test_implicit_head(app, client):
    class Index(flask.views.MethodView):
        def get(self):
            return flask.Response("Blub", headers={"X-Method": flask.request.method})

    app.add_url_rule("/", view_func=Index.as_view("index"))
    rv = client.get("/")
    assert rv.data == b"Blub"
    assert rv.headers["X-Method"] == "GET"
    rv = client.head("/")
    assert rv.data == b""
    assert rv.headers["X-Method"] == "HEAD"

Subdomains

Defined In

Calls

Frequently Asked Questions

What does test_implicit_head() do?
test_implicit_head() is a function in the flask codebase, defined in tests/test_views.py.
Where is test_implicit_head() defined?
test_implicit_head() is defined in tests/test_views.py at line 141.
What does test_implicit_head() call?
test_implicit_head() calls 2 function(s): get, head.

Analyze Your Own Codebase

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

Try Supermodel Free