mirror of
https://github.com/open-webui/open-webui
synced 2025-01-22 10:45:47 +00:00
Merge pull request #8712 from rragundez/improve-s3-provider-tests
Improve s3 provider tests
This commit is contained in:
commit
ffd10e8b6f
@ -87,13 +87,17 @@ class TestLocalStorageProvider:
|
|||||||
|
|
||||||
@mock_aws
|
@mock_aws
|
||||||
class TestS3StorageProvider:
|
class TestS3StorageProvider:
|
||||||
Storage = provider.S3StorageProvider()
|
|
||||||
Storage.bucket_name = "my-bucket"
|
def __init__(self):
|
||||||
s3_client = boto3.resource("s3", region_name="us-east-1")
|
self.Storage = provider.S3StorageProvider()
|
||||||
file_content = b"test content"
|
self.Storage.bucket_name = "my-bucket"
|
||||||
filename = "test.txt"
|
self.s3_client = boto3.resource("s3", region_name="us-east-1")
|
||||||
filename_extra = "test_exyta.txt"
|
self.file_content = b"test content"
|
||||||
file_bytesio_empty = io.BytesIO()
|
self.filename = "test.txt"
|
||||||
|
self.filename_extra = "test_exyta.txt"
|
||||||
|
self.file_bytesio_empty = io.BytesIO()
|
||||||
|
super().__init__()
|
||||||
|
|
||||||
|
|
||||||
def test_upload_file(self, monkeypatch, tmp_path):
|
def test_upload_file(self, monkeypatch, tmp_path):
|
||||||
upload_dir = mock_upload_dir(monkeypatch, tmp_path)
|
upload_dir = mock_upload_dir(monkeypatch, tmp_path)
|
||||||
|
Loading…
Reference in New Issue
Block a user