chore/ 删除无用文件

This commit is contained in:
Kevin
2026-03-19 14:36:14 +08:00
parent 2f60858c9c
commit c6e07ce5ca
135 changed files with 2111 additions and 4510 deletions

View File

@@ -67,7 +67,9 @@ class MemoirImageStorageTest(unittest.TestCase):
client.put_object.assert_called_once()
@patch("app.features.memoir.memoir_images.storage.CosS3Client")
def test_upload_bytes_normalizes_duplicate_appid_suffix_in_base_url(self, client_cls):
def test_upload_bytes_normalizes_duplicate_appid_suffix_in_base_url(
self, client_cls
):
client = Mock()
client_cls.return_value = client
storage = TencentCosStorageService(
@@ -105,7 +107,9 @@ class MemoirImageStorageTest(unittest.TestCase):
@patch("app.features.memoir.memoir_images.storage.CosS3Client")
def test_get_download_url_returns_presigned_download_url(self, client_cls):
client = Mock()
client.get_presigned_download_url.return_value = "https://cos.example.com/0.png?q-sign-algorithm=sha1"
client.get_presigned_download_url.return_value = (
"https://cos.example.com/0.png?q-sign-algorithm=sha1"
)
client_cls.return_value = client
storage = TencentCosStorageService(
secret_id="id",
@@ -203,10 +207,14 @@ class MemoirImageStorageTest(unittest.TestCase):
self.assertTrue(_is_retryable_cos_error(CosClientError("timeout")))
def test_is_retryable_returns_false_for_4xx_service_error(self):
self.assertFalse(_is_retryable_cos_error(CosServiceError("GET", "Forbidden", 403)))
self.assertFalse(
_is_retryable_cos_error(CosServiceError("GET", "Forbidden", 403))
)
def test_is_retryable_returns_true_for_5xx_service_error(self):
self.assertTrue(_is_retryable_cos_error(CosServiceError("GET", "Internal", 500)))
self.assertTrue(
_is_retryable_cos_error(CosServiceError("GET", "Internal", 500))
)
@patch("app.features.memoir.memoir_images.storage.CosS3Client")
def test_cos_config_includes_scheme_and_token(self, client_cls):