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

Function test_options_on_multiple_rules

tests/test_basic.py:42–52  ·  view source on GitHub ↗
(app, client)

Source from the content-addressed store, hash-verified

40
41
42def test_options_on_multiple_rules(app, client):
43 @app.route("/", methods=["GET", "POST"])
44 def index():
45 return "Hello World"
46
47 @app.route("/", methods=["PUT"])
48 def index_put():
49 return "Aha!"
50
51 rv = client.open("/", method="OPTIONS")
52 assert sorted(rv.allow) == ["GET", "HEAD", "OPTIONS", "POST", "PUT"]
53
54
55@pytest.mark.parametrize("method", ["get", "post", "put", "delete", "patch"])

Callers

nothing calls this directly

Calls 1

openMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…