(name, ascii, utf8)
| 113 | ), |
| 114 | ) |
| 115 | def 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 | |
| 127 | def test_no_cache_conditional_default(): |