Skip to content

Commit

Permalink
formatted
Browse files Browse the repository at this point in the history
Signed-off-by: Pratiksha Sankhe <[email protected]>
  • Loading branch information
psankhe28 committed Oct 8, 2024
1 parent 8556797 commit ccc0a46
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 3 additions & 1 deletion cloud_storage_handler/clients/minio.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ def get_minio_client():
"""
init_client = MinioClient()
client = init_client.get_client()
init_client.create_bucket()
minio = MinioClient()
minio_client = minio.client
minio_client.create_bucket()
return client


Expand Down
3 changes: 1 addition & 2 deletions cloud_storage_handler/clients/minio_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from foca import Foca
from minio import Minio

from cloud_storage_handler.api.elixircloud.csh.constants import CshConstants
from cloud_storage_handler.api.elixircloud.csh.models import MinioConfig
from cloud_storage_handler.utils import get_config_path

Expand Down Expand Up @@ -39,7 +38,7 @@ def get_minio_config(self) -> MinioConfig:
secret_key=minio_config["secret_key"],
bucket_name=minio_config["bucket_name"],
)


class MinioClient:
"""A class to manage MinIO client configuration and bucket creation."""
Expand Down
3 changes: 1 addition & 2 deletions tests/test_integration/test_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

def test_get_root():
"""Test the root endpoint of the service with a mocked response."""

server_url = "http://localhost:8080/elixircoud/csh/v1"

with mock.patch("requests.get") as mock_get:
Expand All @@ -23,4 +22,4 @@ def test_get_root():
response.status_code == HTTPStatus.OK
), f"Expected status code 200, got {response.status_code}"

mock_get.assert_called_once_with(server_url)
mock_get.assert_called_once_with(server_url)

0 comments on commit ccc0a46

Please sign in to comment.