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

Function test_method_based_view

tests/test_views.py:28–38  ·  view source on GitHub ↗
(app)

Source from the content-addressed store, hash-verified

26
27
28def test_method_based_view(app):
29 class Index(flask.views.MethodView):
30 def get(self):
31 return "GET"
32
33 def post(self):
34 return "POST"
35
36 app.add_url_rule("/", view_func=Index.as_view("index"))
37
38 common_test(app)
39
40
41def test_view_patching(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