fix: voice_clone集成测试断言修复 #219
Reference in New Issue
Block a user
Delete Branch "fix/voice-clone-integration-test-assertions"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
问题
音色克隆已从同步返回 ready 改为异步返回 processing,但集成测试断言未同步更新,导致 4 个测试持续失败,挂在 CI 结果里干扰判断。
改动
验证
33 个 voice_clone 集成测试全部通过 ✅
PR #219 审查结论:✅ 通过
审查范围
tests/integration/test_voice_clone_api.py中 voice_clone 集成测试断言修复。核心改动验证
1. Mock 默认模式改为异步 ✅
MockCosyVoiceService(async_mode=False)→async_mode=True2. 断言修复(4 处核心改动) ✅
test_create_with_source_audiotest_retry_failed_clonetest_retry_increments_retry_counttest_failed_retry_flow3. 预签名依赖覆盖 ✅
get_audio_url_signer的 mock(返回原值),避免音频 URL 预签名逻辑干扰接口行为断言test_audio_url_presign.py覆盖结论
改动正确,断言与真实 CosyVoice 异步行为对齐,可合并。