MCPcopy
hub / github.com/pallets/werkzeug / test_max_age

Function test_max_age

tests/test_send_file.py:144–151  ·  view source on GitHub ↗
(value, public)

Source from the content-addressed store, hash-verified

142
143@pytest.mark.parametrize(("value", "public"), [(0, False), (60, True)])
144def test_max_age(value, public):
145 rv = send_file(txt_path, environ, max_age=value)
146 rv.close()
147 assert ("no-cache" in rv.headers["Cache-Control"]) != public
148 assert rv.cache_control.public == public
149 assert rv.cache_control.max_age == value
150 assert rv.expires
151 assert rv.status_code == 200
152
153
154def test_etag():

Callers

nothing calls this directly

Calls 2

send_fileFunction · 0.90
closeMethod · 0.45

Tested by

no test coverage detected