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:
Asuka Minato
2025-10-05 15:57:42 +09:00
committed by GitHub
parent 22f64d60bb
commit c20e0ad90d
16 changed files with 106 additions and 87 deletions

View File

@@ -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",