style: auto-format with black + isort + prettier [skip ci-format-check]
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 8s
CI/CD Pipeline / Validate - Type Check (mypy) (pull_request) Successful in 1m12s
CI/CD Pipeline / Validate - Migration (alembic) (pull_request) Successful in 1m22s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 1m19s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 1m32s
AI Code Review / AI Code Review (pull_request) Successful in 1m33s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Successful in 1m34s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 1m51s
CI/CD Pipeline / PR Build Web Image (pull_request) Successful in 2m36s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 2m28s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 4m7s
CI/CD Pipeline / Validate - Code Quality (pull_request) Successful in 4m43s
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 5m59s
CI/CD Pipeline / Integration Tests (pull_request) Successful in 3m16s
CI/CD Pipeline / Unit Tests (pull_request) Failing after 8m43s
CI/CD Pipeline / CI Gate (pull_request) Failing after 7s
CI/CD Pipeline / Production Browser E2E (pull_request) Failing after 1153h10m24s
CI/CD Pipeline / Build Production Web Image (pull_request) Failing after 1153h10m25s
CI/CD Pipeline / Build Production API Image (pull_request) Failing after 1153h10m25s
CI/CD Pipeline / Canary Release to Production (pull_request) Failing after 1153h10m24s
CI/CD Pipeline / Deploy Production (pull_request) Failing after 1153h10m24s
CI/CD Pipeline / ACR Image Cleanup (pull_request) Failing after 1153h14m48s
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 1153h14m50s
CI/CD Pipeline / Staging E2E Tests (pull_request) Failing after 1153h14m52s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Failing after 1153h16m18s
CI/CD Pipeline / Build Staging Worker Image (pull_request) Failing after 1153h20m27s
CI/CD Pipeline / Build Staging API Image (pull_request) Failing after 1153h20m28s
CI/CD Pipeline / Build Production Worker Image (pull_request) Failing after 1153h43m34s
CI/CD Pipeline / Build Staging Web Image (pull_request) Failing after 1153h53m36s
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 8s
CI/CD Pipeline / Validate - Type Check (mypy) (pull_request) Successful in 1m12s
CI/CD Pipeline / Validate - Migration (alembic) (pull_request) Successful in 1m22s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 1m19s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 1m32s
AI Code Review / AI Code Review (pull_request) Successful in 1m33s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Successful in 1m34s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 1m51s
CI/CD Pipeline / PR Build Web Image (pull_request) Successful in 2m36s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 2m28s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 4m7s
CI/CD Pipeline / Validate - Code Quality (pull_request) Successful in 4m43s
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 5m59s
CI/CD Pipeline / Integration Tests (pull_request) Successful in 3m16s
CI/CD Pipeline / Unit Tests (pull_request) Failing after 8m43s
CI/CD Pipeline / CI Gate (pull_request) Failing after 7s
CI/CD Pipeline / Production Browser E2E (pull_request) Failing after 1153h10m24s
CI/CD Pipeline / Build Production Web Image (pull_request) Failing after 1153h10m25s
CI/CD Pipeline / Build Production API Image (pull_request) Failing after 1153h10m25s
CI/CD Pipeline / Canary Release to Production (pull_request) Failing after 1153h10m24s
CI/CD Pipeline / Deploy Production (pull_request) Failing after 1153h10m24s
CI/CD Pipeline / ACR Image Cleanup (pull_request) Failing after 1153h14m48s
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 1153h14m50s
CI/CD Pipeline / Staging E2E Tests (pull_request) Failing after 1153h14m52s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Failing after 1153h16m18s
CI/CD Pipeline / Build Staging Worker Image (pull_request) Failing after 1153h20m27s
CI/CD Pipeline / Build Staging API Image (pull_request) Failing after 1153h20m28s
CI/CD Pipeline / Build Production Worker Image (pull_request) Failing after 1153h43m34s
CI/CD Pipeline / Build Staging Web Image (pull_request) Failing after 1153h53m36s
This commit is contained in:
@@ -642,4 +642,3 @@
|
||||
font-size: 36px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -57,6 +57,7 @@ class TestVoiceClonePreview:
|
||||
repo = MagicMock()
|
||||
if profile is None:
|
||||
from packages.application.voice_clone.use_cases import VoiceCloneNotFoundError
|
||||
|
||||
repo.get.return_value = None
|
||||
use_case_instance = MagicMock()
|
||||
use_case_instance.execute.side_effect = VoiceCloneNotFoundError("not found")
|
||||
@@ -77,9 +78,11 @@ class TestVoiceClonePreview:
|
||||
def mock_execute(self, clone_id, uid):
|
||||
if profile is None:
|
||||
from packages.application.voice_clone.use_cases import VoiceCloneNotFoundError
|
||||
|
||||
raise VoiceCloneNotFoundError("not found")
|
||||
if profile.user_id != uid:
|
||||
from packages.application.voice_clone.use_cases import VoiceCloneNotFoundError
|
||||
|
||||
raise VoiceCloneNotFoundError("not found")
|
||||
return profile
|
||||
|
||||
@@ -97,12 +100,13 @@ class TestVoiceClonePreview:
|
||||
return result
|
||||
finally:
|
||||
GetVoiceCloneUseCase.__init__ = original_init
|
||||
if hasattr(GetVoiceCloneUseCase, 'execute'):
|
||||
delattr(GetVoiceCloneUseCase, 'execute')
|
||||
if hasattr(GetVoiceCloneUseCase, "execute"):
|
||||
delattr(GetVoiceCloneUseCase, "execute")
|
||||
|
||||
def test_preview_success_ready_clone(self) -> None:
|
||||
"""就绪的克隆音色可以正常试听。"""
|
||||
from app.api.routes.voice_clones import _clone_preview_cache
|
||||
|
||||
_clone_preview_cache.clear()
|
||||
|
||||
profile = _make_profile()
|
||||
@@ -130,6 +134,7 @@ class TestVoiceClonePreview:
|
||||
def test_preview_custom_text(self) -> None:
|
||||
"""自定义试听文本。"""
|
||||
from app.api.routes.voice_clones import _clone_preview_cache
|
||||
|
||||
_clone_preview_cache.clear()
|
||||
|
||||
profile = _make_profile()
|
||||
@@ -160,6 +165,7 @@ class TestVoiceClonePreview:
|
||||
def test_preview_not_ready_pending(self) -> None:
|
||||
"""pending 状态的克隆音色不能试听。"""
|
||||
from app.api.routes.voice_clones import _clone_preview_cache
|
||||
|
||||
_clone_preview_cache.clear()
|
||||
|
||||
profile = _make_profile(status=VoiceCloneStatus.PENDING, voice_id="")
|
||||
@@ -175,6 +181,7 @@ class TestVoiceClonePreview:
|
||||
def test_preview_not_ready_processing(self) -> None:
|
||||
"""processing 状态的克隆音色不能试听。"""
|
||||
from app.api.routes.voice_clones import _clone_preview_cache
|
||||
|
||||
_clone_preview_cache.clear()
|
||||
|
||||
profile = _make_profile(status=VoiceCloneStatus.PROCESSING)
|
||||
@@ -189,6 +196,7 @@ class TestVoiceClonePreview:
|
||||
def test_preview_not_ready_failed(self) -> None:
|
||||
"""failed 状态的克隆音色不能试听。"""
|
||||
from app.api.routes.voice_clones import _clone_preview_cache
|
||||
|
||||
_clone_preview_cache.clear()
|
||||
|
||||
profile = _make_profile(status=VoiceCloneStatus.FAILED, error_message="超时")
|
||||
@@ -203,6 +211,7 @@ class TestVoiceClonePreview:
|
||||
def test_preview_tts_failure(self) -> None:
|
||||
"""TTS 合成失败返回 502。"""
|
||||
from app.api.routes.voice_clones import _clone_preview_cache
|
||||
|
||||
_clone_preview_cache.clear()
|
||||
|
||||
profile = _make_profile()
|
||||
@@ -217,7 +226,8 @@ class TestVoiceClonePreview:
|
||||
|
||||
def test_preview_cache_default_text(self) -> None:
|
||||
"""默认试听文本使用缓存。"""
|
||||
from app.api.routes.voice_clones import _clone_preview_cache, CLONE_PREVIEW_CACHE_TTL
|
||||
from app.api.routes.voice_clones import CLONE_PREVIEW_CACHE_TTL, _clone_preview_cache
|
||||
|
||||
_clone_preview_cache.clear()
|
||||
|
||||
profile = _make_profile()
|
||||
@@ -241,6 +251,7 @@ class TestVoiceClonePreview:
|
||||
def test_preview_custom_text_no_cache(self) -> None:
|
||||
"""自定义文本不使用缓存。"""
|
||||
from app.api.routes.voice_clones import _clone_preview_cache
|
||||
|
||||
_clone_preview_cache.clear()
|
||||
|
||||
profile = _make_profile()
|
||||
@@ -259,6 +270,7 @@ class TestVoiceClonePreview:
|
||||
def test_preview_wrong_user(self) -> None:
|
||||
"""非所有者不能访问他人克隆音色的试听。"""
|
||||
from app.api.routes.voice_clones import _clone_preview_cache
|
||||
|
||||
_clone_preview_cache.clear()
|
||||
|
||||
profile = _make_profile(user_id="user_001")
|
||||
|
||||
Reference in New Issue
Block a user