Skip to content

Commit

Permalink
Use zip(..., strict=True) to force arguments to be the same length
Browse files Browse the repository at this point in the history
  • Loading branch information
smokestacklightnin committed Feb 4, 2025
1 parent 5eafb6d commit 963af6a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/deploy/api/test_endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def test_get_document_content(tmp_local_root, mime_type):
"GET", f"/api/documents/{document['id']}/content"
) as response:
response_mime_type = response.headers["content-type"].split(";")[0]
received_text = response.read().decode("utf-8")
received_text = response.read().decode("utf-8").replace("\r\n", "\n")

assert received_text == document_content

Expand Down
6 changes: 5 additions & 1 deletion tests/deploy/api/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ def upload_documents(*, client, document_paths, mime_types=None):
"name": document_path.name,
"mime_type": mime_type,
}
for document_path, mime_type in zip(document_paths, mime_types)
for document_path, mime_type in zip(
document_paths,
mime_types,
strict=True,
)
],
)
.raise_for_status()
Expand Down

0 comments on commit 963af6a

Please sign in to comment.