erase comments

This commit is contained in:
agape1225 2025-07-23 20:10:52 +09:00 committed by GitHub
parent 439f1f2997
commit ab5702677b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -105,16 +105,14 @@ class TestSendfile:
"""
file_content = b"this is file content"
file_obj: IO[bytes] = io.BytesIO(file_content)
# 2. send_file 함수에 as_attachment=True 인자를 추가합니다.
rv = flask.send_file(
file_obj,
download_name="test.txt",
mimetype="text/plain",
as_attachment=True, # <-- 이 부분을 추가하세요.
as_attachment=True,
)
# 3. 응답 검증
assert rv.status_code == 200
assert rv.direct_passthrough
@ -122,7 +120,6 @@ class TestSendfile:
assert rv.data == file_content
assert rv.mimetype == "text/plain"
# 이제 이 assert문이 정상적으로 통과합니다.
assert "attachment; filename=test.txt" in rv.headers["Content-Disposition"]
rv.close()