Skip to content

Commit b70aa4b

Browse files
committed
Fix test
1 parent 45965c3 commit b70aa4b

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

test_general/api/test_app.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,11 +1218,13 @@ def test_text_file_with_pdf_extension_detected_correctly():
12181218
temp_file_path = temp_file.name
12191219

12201220
try:
1221-
# Upload the file without explicitly setting content type
1222-
# The client will auto-detect Content-Type as application/pdf based on .pdf extension
1221+
# Upload the file with explicit PDF content type to test that the API
1222+
# ignores client-provided Content-Type and inspects actual file content
12231223
with open(temp_file_path, "rb") as f:
12241224
response = client.post(
1225-
MAIN_API_ROUTE, files=[("files", (temp_file_path, f))], data={"strategy": "fast"}
1225+
MAIN_API_ROUTE,
1226+
files=[("files", (temp_file_path, f, "application/pdf"))],
1227+
data={"strategy": "fast"},
12261228
)
12271229

12281230
assert response.status_code == 200

0 commit comments

Comments
 (0)