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

Function test_static_files

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

Source from the content-addressed store, hash-verified

1394
1395
1396def test_static_files(app, client):
1397 rv = client.get("/static/index.html")
1398 assert rv.status_code == 200
1399 assert rv.data.strip() == b"<h1>Hello World!</h1>"
1400 with app.test_request_context():
1401 assert flask.url_for("static", filename="index.html") == "/static/index.html"
1402 rv.close()
1403
1404
1405def 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