added support for content type when putting object in minio
Code Quality Pipeline / code-quality (pull_request) Failing after 24s
Test Python Package / test (pull_request) Successful in 1m9s

This commit is contained in:
Brian Bjarke Jensen
2025-09-18 19:34:05 +02:00
parent 1dd604dc2a
commit 3ab8da92fb
2 changed files with 18 additions and 1 deletions
+14
View File
@@ -370,6 +370,20 @@ def test_should_raise_value_error_on_invalid_put_data(
minio_adapter._put(object_name, data) # type: ignore
def test_should_raise_value_error_on_invalid_put_content_type(
data: BytesIO,
minio_adapter: MinioAdapter,
) -> None:
"""Test that the MinioAdapter raises ValueError when putting with an invalid content type."""
# Arrange
object_name = "valid_object_name"
invalid_content_types = ["", 123, None]
# Act & Assert
for content_type in invalid_content_types:
with pytest.raises(ValueError):
minio_adapter._put(object_name, data, content_type) # type: ignore
def test_should_raise_connection_error_on_put_when_not_connected(
data: BytesIO,
minio_adapter: MinioAdapter,