refactor: Remove CSV upload size limit and related validation (#32000)

This commit is contained in:
sha174n
2025-01-27 23:52:05 +00:00
committed by GitHub
parent 925938b4d1
commit 827042f12f
3 changed files with 0 additions and 40 deletions

View File

@@ -1090,32 +1090,6 @@ def test_csv_upload_validation(
assert response.json == expected_response
def test_csv_upload_file_size_validation(
mocker: MockerFixture,
client: Any,
full_api_access: None,
) -> None:
"""
Test CSV Upload validation fails.
"""
_ = mocker.patch.object(UploadCommand, "run")
current_app.config["CSV_UPLOAD_MAX_SIZE"] = 5
response = client.post(
"/api/v1/database/1/csv_upload/",
data={
"file": (create_csv_file(), "out.csv"),
"table_name": "table1",
"delimiter": ",",
},
content_type="multipart/form-data",
)
assert response.status_code == 400
assert response.json == {
"message": {"file": ["File size exceeds the maximum allowed size."]}
}
current_app.config["CSV_UPLOAD_MAX_SIZE"] = None
@pytest.mark.parametrize(
"filename",
[