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

Function test_static_files

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

Source from the content-addressed store, hash-verified

1422
1423
1424def test_static_files(app, client):
1425 rv = client.get("/static/index.html")
1426 assert rv.status_code == 200
1427 assert rv.data.strip() == b"<h1>Hello World!</h1>"
1428 with app.test_request_context():
1429 assert flask.url_for("static", filename="index.html") == "/static/index.html"
1430 rv.close()
1431
1432
1433def test_static_url_path():

Callers

nothing calls this directly

Calls 4

test_request_contextMethod · 0.80
url_forMethod · 0.80
closeMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected