fix(test): 修复 mock clip 缺失字段导致 7 个单测 Pydantic 校验失败 #1407
@@ -61,6 +61,9 @@ def _make_mock_clip(clip_id="clip-001", order=0, duration=10.0, clip_type="video
|
||||
clip.config = {}
|
||||
clip.asset_id = "asset-001"
|
||||
clip.status = "ready"
|
||||
clip.template_clip_config_id = ""
|
||||
clip.created_at = None
|
||||
clip.updated_at = None
|
||||
return clip
|
||||
|
||||
|
||||
@@ -327,7 +330,8 @@ class TestClipSplitMerge:
|
||||
resp = c.post(BASE + "/clips/merge", json={"clip_ids": ["clip-001", "clip-002"]})
|
||||
assert resp.status_code == 200
|
||||
data = resp.json()
|
||||
assert "id" in data
|
||||
assert "merged_clip" in data
|
||||
assert "id" in data["merged_clip"]
|
||||
mock_plan_svc.merge_clips.assert_called_once_with(["clip-001", "clip-002"])
|
||||
|
||||
def test_merge_clips_single_422(self, client):
|
||||
|
||||
Reference in New Issue
Block a user