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

Function test_disposition_name

tests/test_send_file.py:78–81  ·  view source on GitHub ↗
(as_attachment, value)

Source from the content-addressed store, hash-verified

76 ("as_attachment", "value"), [(False, "inline"), (True, "attachment")]
77)
78def test_disposition_name(as_attachment, value):
79 rv = send_file(txt_path, environ, as_attachment=as_attachment)
80 assert rv.headers["Content-Disposition"] == f"{value}; filename=test.txt"
81 rv.close()
82
83
84def test_object_attachment_requires_name():

Callers

nothing calls this directly

Calls 2

send_fileFunction · 0.90
closeMethod · 0.45

Tested by

no test coverage detected