From ee561b0d64447c174130161d8de09e8d4cee0703 Mon Sep 17 00:00:00 2001 From: CI Bot Date: Sun, 23 Aug 2026 15:39:08 +0800 Subject: [PATCH] =?UTF-8?q?fix(editor):=20B017=20lint=E4=BF=AE=E5=A4=8D=20?= =?UTF-8?q?pytest.raises(Exception)=E2=86=92ValidationError?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/unit/test_batch_clips_endpoint.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/unit/test_batch_clips_endpoint.py b/tests/unit/test_batch_clips_endpoint.py index 37bf87ff0..83641155e 100755 --- a/tests/unit/test_batch_clips_endpoint.py +++ b/tests/unit/test_batch_clips_endpoint.py @@ -9,6 +9,7 @@ import os from unittest.mock import MagicMock import pytest +from pydantic import ValidationError os.environ.setdefault("JWT_SECRET_KEY", "unit-test-secret-key-for-testing") @@ -117,7 +118,7 @@ class TestEditorClipBatchItemValidation: """asset_id 为空字符串时应被拒绝(min_length=1)。""" from app.api.routes.templates_editor.schemas import EditorClipBatchItem - with pytest.raises(Exception): + with pytest.raises(ValidationError): EditorClipBatchItem(asset_id="", start_time=0.0, duration=3.0, order=0) def test_asset_id_valid(self):