test_view_inheritance() — flask Function Reference
Architecture documentation for the test_view_inheritance() function in test_views.py from the flask codebase.
Entity Profile
Dependency Diagram
graph TD e68d0a18_a70f_cd69_b710_529a8edc40b1["test_view_inheritance()"] dc72c3f0_27a2_eeb5_19d5_19d3385508ed["test_views.py"] e68d0a18_a70f_cd69_b710_529a8edc40b1 -->|defined in| dc72c3f0_27a2_eeb5_19d5_19d3385508ed 164a6c29_59f1_2f2f_3c1b_3228d52eb49b["post()"] e68d0a18_a70f_cd69_b710_529a8edc40b1 -->|calls| 164a6c29_59f1_2f2f_3c1b_3228d52eb49b 4d3129d2_54db_e673_646a_eba9e00383fb["get()"] e68d0a18_a70f_cd69_b710_529a8edc40b1 -->|calls| 4d3129d2_54db_e673_646a_eba9e00383fb style e68d0a18_a70f_cd69_b710_529a8edc40b1 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_views.py lines 62–77
def test_view_inheritance(app, client):
class Index(flask.views.MethodView):
def get(self):
return "GET"
def post(self):
return "POST"
class BetterIndex(Index):
def delete(self):
return "DELETE"
app.add_url_rule("/", view_func=BetterIndex.as_view("index"))
meths = parse_set_header(client.open("/", method="OPTIONS").headers["Allow"])
assert sorted(meths) == ["DELETE", "GET", "HEAD", "OPTIONS", "POST"]
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_view_inheritance() do?
test_view_inheritance() is a function in the flask codebase, defined in tests/test_views.py.
Where is test_view_inheritance() defined?
test_view_inheritance() is defined in tests/test_views.py at line 62.
What does test_view_inheritance() call?
test_view_inheritance() calls 2 function(s): get, post.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free