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

Function test_open_resource

tests/test_helpers.py:362–366  ·  view source on GitHub ↗
(mode)

Source from the content-addressed store, hash-verified

360
361@pytest.mark.parametrize("mode", ("r", "rb", "rt"))
362def test_open_resource(mode):
363 app = flask.Flask(__name__)
364
365 with app.open_resource("static/index.html", mode) as f:
366 assert "<h1>Hello World!</h1>" in str(f.read())
367
368
369@pytest.mark.parametrize("mode", ("w", "x", "a", "r+"))

Callers

nothing calls this directly

Calls 1

open_resourceMethod · 0.95

Tested by

no test coverage detected