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

Function test_options_work

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

Source from the content-addressed store, hash-verified

28
29
30def test_options_work(app, client):
31 @app.route("/", methods=["GET", "POST"])
32 def index():
33 return "Hello World"
34
35 rv = client.open("/", method="OPTIONS")
36 assert sorted(rv.allow) == ["GET", "HEAD", "OPTIONS", "POST"]
37 assert rv.data == b""
38
39
40def test_options_on_multiple_rules(app, client):

Callers

nothing calls this directly

Calls 1

openMethod · 0.80

Tested by

no test coverage detected