test(wave158): edit_plan剪辑计划单测 +32 #1088

Merged
xiaoxia merged 8 commits from test/wave158-edit-plan into develop 2026-07-28 16:20:20 +08:00

8 Commits

Author SHA1 Message Date
xiaoxia 72368c3ff8 test(wave158): edit_plan剪辑计划单测 +32
CI/CD Pipeline / Check if frontend-only change (pull_request) Waiting to run
CI/CD Pipeline / Validate - Code Quality (pull_request) Waiting to run
CI/CD Pipeline / Validate - Type Check (mypy) (pull_request) Waiting to run
CI/CD Pipeline / Validate - Migration (alembic) (pull_request) Waiting to run
CI/CD Pipeline / Unit Tests (pull_request) Blocked by required conditions
CI/CD Pipeline / Integration Tests (pull_request) Blocked by required conditions
CI/CD Pipeline / Frontend Lint (pull_request) Waiting to run
CI/CD Pipeline / Frontend Unit Tests (pull_request) Blocked by required conditions
CI/CD Pipeline / PR Build API Image (pull_request) Waiting to run
CI/CD Pipeline / PR Build Web Image (pull_request) Waiting to run
CI/CD Pipeline / PR Build Worker Image (pull_request) Waiting to run
CI/CD Pipeline / Build Staging API Image (pull_request) Waiting to run
CI/CD Pipeline / Build Staging Web Image (pull_request) Waiting to run
CI/CD Pipeline / Build Staging Worker Image (pull_request) Waiting to run
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Blocked by required conditions
CI/CD Pipeline / Staging E2E Tests (pull_request) Blocked by required conditions
CI/CD Pipeline / Staging API Integration Tests (pull_request) Blocked by required conditions
CI/CD Pipeline / Build Production API Image (pull_request) Blocked by required conditions
CI/CD Pipeline / Build Production Web Image (pull_request) Blocked by required conditions
CI/CD Pipeline / Build Production Worker Image (pull_request) Blocked by required conditions
CI/CD Pipeline / Deploy Production (pull_request) Blocked by required conditions
CI/CD Pipeline / Production Browser E2E (pull_request) Blocked by required conditions
CI/CD Pipeline / ACR Image Cleanup (pull_request) Blocked by required conditions
CI/CD Pipeline / Canary Release to Production (pull_request) Blocked by required conditions
PR Automation / Auto Approve on CI Green (pull_request) Waiting to run
PR Automation / Auto Merge on CI Green + Approved (pull_request) Waiting to run
Preview Deploy / Deploy Preview Environment (pull_request) Waiting to run
CI/CD Pipeline / CI Gate (pull_request) 手动设置
AI Code Review / AI Code Review (pull_request) 手动设置
Preview Cleanup / Cleanup Preview Environment (pull_request) Waiting to run
ACR Cleanup / ACR Image Cleanup (pull_request_target) Has been cancelled
为 domain/edit_plan.py 新增 32 个单测:

- EditPlanStatus 枚举:6个
- create 工厂/校验:11个(必填/strip/空值/默认值)
- 状态流转(draft→editing→rendering→completed/failed):14个
- config 独立性:1个
2026-07-28 16:13:55 +08:00
xiaoxia 9be7f68a7a test(wave157): domain层7个小模块批量单测 +44
为 domain 层 7 个小模块新增 44 个单测,纯逻辑 0 外部依赖:

- EditingMode 枚举:6个
- Tag 工厂:4个
- RecipeItem/Recipe:6个
- VoiceLibraryItem:3个
- TitleLibraryItem:3个
- TemplateSegment/Template/TemplateCategory:6个
- EditTemplateStatus/EditTemplate:16个
2026-07-28 16:13:55 +08:00
xiaoxia 09175e2ad6 test(wave156): generation_task生成任务实体单测 +24
为 domain/generation_task.py 新增 24 个单测:

- GenerationTaskStatus 枚举:6个
- create 工厂:18个(最简/全字段/二选一校验/列表拷贝/默认值)
2026-07-28 16:13:55 +08:00
xiaoxia a85c257eca test(wave155): generated_video生成视频实体单测 +16
为 domain/generated_video.py 新增 16 个单测:

- create 必填字段 + 默认值
- strip 行为
- 4个空值校验(project_id/task_id/name/file_url)
- 唯一ID + 时间戳
- 零值合法(宽高/fps)
- generation_params 独立性
2026-07-28 16:13:55 +08:00
xiaoxia 1147172ac6 test(wave154): classification素材分类单测 +34
为 domain/classification.py 新增 34 个单测:

- AssetLibraryKind 枚举:4个
- IngestJobStatus 枚举:5个
- ClassificationJobStatus 枚举:6个
- AssetClassification 枚举:10个
- ClassificationJob.create:9个
2026-07-28 16:13:55 +08:00
xiaoxia 2d112848c4 test(wave153): edit_plan_clip剪辑计划片段单测 +44
为 domain/edit_plan_clip.py 新增 44 个单测,纯逻辑 0 外部依赖:

- EditPlanClipStatus 枚举:7个
- create 工厂/校验:17个
- assign_asset 素材分配:5个
- 状态流转(pending→ready→rendered/failed):8个
- end_time/has_asset 属性:7个
2026-07-28 16:13:55 +08:00
xiaoxia 041cedf958 test(wave152): duplication查重记录单测 +40
PR Automation / Auto Approve on CI Green (pull_request) Waiting to run
PR Automation / Auto Merge on CI Green + Approved (pull_request) Waiting to run
CI/CD Pipeline / Check if frontend-only change (pull_request) Has been cancelled
CI/CD Pipeline / Validate - Code Quality (pull_request) Has been cancelled
CI/CD Pipeline / Validate - Type Check (mypy) (pull_request) Has been cancelled
CI/CD Pipeline / Validate - Migration (alembic) (pull_request) Has been cancelled
CI/CD Pipeline / Unit Tests (pull_request) Has been cancelled
CI/CD Pipeline / Integration Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been cancelled
CI/CD Pipeline / PR Build API Image (pull_request) Has been cancelled
CI/CD Pipeline / PR Build Web Image (pull_request) Has been cancelled
CI/CD Pipeline / PR Build Worker Image (pull_request) Has been cancelled
CI/CD Pipeline / Build Staging API Image (pull_request) Has been cancelled
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been cancelled
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been cancelled
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been cancelled
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been cancelled
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been cancelled
CI/CD Pipeline / Build Production API Image (pull_request) Has been cancelled
CI/CD Pipeline / Build Production Web Image (pull_request) Has been cancelled
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been cancelled
CI/CD Pipeline / Deploy Production (pull_request) Has been cancelled
CI/CD Pipeline / Production Browser E2E (pull_request) Has been cancelled
CI/CD Pipeline / ACR Image Cleanup (pull_request) Has been cancelled
CI/CD Pipeline / Canary Release to Production (pull_request) Has been cancelled
CI/CD Pipeline / CI Gate (pull_request) Has been cancelled
AI Code Review / AI Code Review (pull_request) Has been cancelled
Preview Deploy / Deploy Preview Environment (pull_request) Has been cancelled
为 domain/duplication.py 新增 40 个单测,纯逻辑 0 外部依赖:

- DuplicateSegment.create 工厂/校验:10个
- DuplicationRecord.create 工厂/校验:11个
- 状态流转 (pending/processing/completed/failed):13个
- can_retry + reset_for_retry:4个
- segments 列表:3个
2026-07-28 16:12:14 +08:00
xiaoxia 6510da7f35 test(wave151): quota配额系统单测补全 +80
为 domain/quota.py 新增 80 个单测,纯逻辑 0 外部依赖:

- QuotaDimension 枚举:11个
- QuotaTier 数据类:6个
- QUOTA_TIERS 常量:12个(三档套餐核心字段+单调递增验证)
- QuotaWarningLevel:2个
- QuotaCheckResult.usage_percent:7个(正常/0/100%/超量/不限量/零限制)
- get_warning_level 告警级别:13个(0%/80%/95%/100%/超量/零限制/不限量/负数)
- QuotaRegistry 注册/查询:14个
- QuotaChecker 配额检查:13个
- 全局单例:3个
2026-07-28 16:12:14 +08:00