MCPcopy Create free account
hub / github.com/pallets/flask / test_method_route

Function test_method_route

tests/test_basic.py:54–62  ·  view source on GitHub ↗
(app, client, method)

Source from the content-addressed store, hash-verified

52
53@pytest.mark.parametrize("method", ["get", "post", "put", "delete", "patch"])
54def test_method_route(app, client, method):
55 method_route = getattr(app, method)
56 client_method = getattr(client, method)
57
58 @method_route("/")
59 def hello():
60 return "Hello"
61
62 assert client_method("/").data == b"Hello"
63
64
65def test_method_route_no_methods(app):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected