MCPcopy
hub / github.com/pallets/flask / test_basic_view

Function test_basic_view

tests/test_views.py:17–25  ·  tests/test_views.py::test_basic_view
(app)

Source from the content-addressed store, hash-verified

15
16
17def test_basic_view(app):
18 class Index(flask.views.View):
19 methods = [class="st">"GET", class="st">"POST"]
20
21 def dispatch_request(self):
22 return flask.request.method
23
24 app.add_url_rule(class="st">"/", view_func=Index.as_view(class="st">"index"))
25 common_test(app)
26
27
28def test_method_based_view(app):

Callers

nothing calls this directly

Calls 3

common_testFunction · 0.85
as_viewMethod · 0.80
add_url_ruleMethod · 0.45

Tested by

no test coverage detected