(as_attachment)
| 165 | |
| 166 | @pytest.mark.parametrize("as_attachment", (True, False)) |
| 167 | def 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( |