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

Function test_non_ascii_name

tests/test_send_file.py:115–124  ·  view source on GitHub ↗
(name, ascii, utf8)

Source from the content-addressed store, hash-verified

113 ),
114)
115def test_non_ascii_name(name, ascii, utf8):
116 rv = send_file(html_path, environ, as_attachment=True, download_name=name)
117 rv.close()
118 content_disposition = rv.headers["Content-Disposition"]
119 assert f"filename={ascii}" in content_disposition
120
121 if utf8:
122 assert f"filename*=UTF-8''{utf8}" in content_disposition
123 else:
124 assert "filename*=UTF-8''" not in content_disposition
125
126
127def test_no_cache_conditional_default():

Callers

nothing calls this directly

Calls 2

send_fileFunction · 0.90
closeMethod · 0.45

Tested by

no test coverage detected