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

Function test_content_encoding

tests/test_send_file.py:167–173  ·  view source on GitHub ↗
(as_attachment)

Source from the content-addressed store, hash-verified

165
166@pytest.mark.parametrize("as_attachment", (True, False))
167def test_content_encoding(as_attachment):
168 rv = send_file(
169 txt_path, environ, download_name="logo.svgz", as_attachment=as_attachment
170 )
171 rv.close()
172 assert rv.mimetype == "image/svg+xml"
173 assert rv.content_encoding == ("gzip" if not as_attachment else None)
174
175
176@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 2

send_fileFunction · 0.90
closeMethod · 0.45

Tested by

no test coverage detected