Removes the 'extensions' directory from pyrightconfig.json and fixes … (#26512)
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
from tos import TosClientV2 # type: ignore
|
||||
|
||||
@@ -13,7 +15,13 @@ class TestVolcengineTos(BaseStorageTest):
|
||||
@pytest.fixture(autouse=True)
|
||||
def setup_method(self, setup_volcengine_tos_mock):
|
||||
"""Executed before each test method."""
|
||||
self.storage = VolcengineTosStorage()
|
||||
with patch("extensions.storage.volcengine_tos_storage.dify_config") as mock_config:
|
||||
mock_config.VOLCENGINE_TOS_ACCESS_KEY = "test_access_key"
|
||||
mock_config.VOLCENGINE_TOS_SECRET_KEY = "test_secret_key"
|
||||
mock_config.VOLCENGINE_TOS_ENDPOINT = "test_endpoint"
|
||||
mock_config.VOLCENGINE_TOS_REGION = "test_region"
|
||||
self.storage = VolcengineTosStorage()
|
||||
|
||||
self.storage.bucket_name = get_example_bucket()
|
||||
self.storage.client = TosClientV2(
|
||||
ak="dify",
|
||||
|
||||
Reference in New Issue
Block a user