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

Function test_options_work

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

openMethod · 0.80

Tested by

no test coverage detected