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

Function test_open_resource

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

Source from the content-addressed store, hash-verified

337
338@pytest.mark.parametrize("mode", ("r", "rb", "rt"))
339def test_open_resource(mode):
340 app = flask.Flask(__name__)
341
342 with app.open_resource("static/index.html", mode) as f:
343 assert "<h1>Hello World!</h1>" in str(f.read())
344
345
346@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