mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-13 06:14:51 +00:00
fix: mini nits
This commit is contained in:
1 parent
71c2e8d4c9
commit
ee552620eb
6 files changed
+21
-26
No files matched your search
@@ -1588,6 +1588,7 @@ class TestServeImage:
|
||||
assert response.headers.get("Content-Type") == "image/png"
|
||||
assert response.headers.get("X-Content-Type-Options") == "nosniff"
|
||||
assert response.is_streamed
|
||||
assert response.content_length is None
|
||||
assert b"".join(response.response) == b"\x89PNG\r\n"
|
||||
mock_storage.get_file.assert_called_once_with(self.image_path)
|
||||
|
||||
|
||||
@@ -300,9 +300,13 @@ class TestUploadFile:
|
||||
response = UploadFile().post()
|
||||
|
||||
assert response.status_code == 413
|
||||
assert "documents.zip" in response.json["message"]
|
||||
assert response.json["message"] == (
|
||||
"documents.zip: ZIP archive failed safety validation"
|
||||
)
|
||||
assert "bad" not in response.json["message"]
|
||||
assert "\n" not in response.json["message"]
|
||||
logged_values = " ".join(str(value) for value in warning.call_args.args)
|
||||
assert "bad\\x0aFORGED" in logged_values
|
||||
assert "\n" not in logged_values
|
||||
|
||||
def test_expands_nested_zip_before_storage(self, app):
|
||||
|
||||
Reference in new issue
Block a user