mirror of
https://github.com/open-webui/open-webui
synced 2025-06-03 19:27:12 +00:00
updates to formatting
This commit is contained in:
parent
4c352ff974
commit
a29f83c4e7
@ -228,7 +228,6 @@ class GCSStorageProvider(StorageProvider):
|
|||||||
LocalStorageProvider.delete_all_files()
|
LocalStorageProvider.delete_all_files()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class AzureStorageProvider(StorageProvider):
|
class AzureStorageProvider(StorageProvider):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.endpoint = AZURE_STORAGE_ENDPOINT
|
self.endpoint = AZURE_STORAGE_ENDPOINT
|
||||||
@ -246,7 +245,9 @@ class AzureStorageProvider(StorageProvider):
|
|||||||
self.blob_service_client = BlobServiceClient(
|
self.blob_service_client = BlobServiceClient(
|
||||||
account_url=self.endpoint, credential=DefaultAzureCredential()
|
account_url=self.endpoint, credential=DefaultAzureCredential()
|
||||||
)
|
)
|
||||||
self.container_client = self.blob_service_client.get_container_client(self.container_name)
|
self.container_client = self.blob_service_client.get_container_client(
|
||||||
|
self.container_name
|
||||||
|
)
|
||||||
|
|
||||||
def upload_file(self, file: BinaryIO, filename: str) -> Tuple[bytes, str]:
|
def upload_file(self, file: BinaryIO, filename: str) -> Tuple[bytes, str]:
|
||||||
"""Handles uploading of the file to Azure Blob Storage."""
|
"""Handles uploading of the file to Azure Blob Storage."""
|
||||||
|
@ -299,17 +299,15 @@ class TestAzureStorageProvider:
|
|||||||
monkeypatch.setattr(
|
monkeypatch.setattr(
|
||||||
azure.storage.blob,
|
azure.storage.blob,
|
||||||
"BlobServiceClient",
|
"BlobServiceClient",
|
||||||
lambda *args, **kwargs: mock_blob_service_client
|
lambda *args, **kwargs: mock_blob_service_client,
|
||||||
)
|
)
|
||||||
monkeypatch.setattr(
|
monkeypatch.setattr(
|
||||||
azure.storage.blob,
|
azure.storage.blob,
|
||||||
"BlobContainerClient",
|
"BlobContainerClient",
|
||||||
lambda *args, **kwargs: mock_container_client
|
lambda *args, **kwargs: mock_container_client,
|
||||||
)
|
)
|
||||||
monkeypatch.setattr(
|
monkeypatch.setattr(
|
||||||
azure.storage.blob,
|
azure.storage.blob, "BlobClient", lambda *args, **kwargs: mock_blob_client
|
||||||
"BlobClient",
|
|
||||||
lambda *args, **kwargs: mock_blob_client
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user