style: auto-format with black + isort + prettier [skip ci-format-check]
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / PR Build API Image (push) Has been skipped
CI/CD Pipeline / PR Build Worker Image (push) Has been skipped
CI/CD Pipeline / PR Build Web Image (push) Has been skipped
CI/CD Pipeline / Validate - Type Check (mypy) (push) Successful in 59s
CI/CD Pipeline / Validate - Migration (alembic) (push) Successful in 1m3s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 3m16s
CI/CD Pipeline / Build Staging Web Image (push) Successful in 3m21s
CI/CD Pipeline / Validate - Code Quality (push) Successful in 5m2s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 5m14s
CI/CD Pipeline / Integration Tests (push) Successful in 1m19s
CI/CD Pipeline / Unit Tests (push) Successful in 8m47s
CI/CD Pipeline / Build Production API Image (push) Has been skipped
CI/CD Pipeline / Build Production Web Image (push) Has been skipped
CI/CD Pipeline / Build Production Worker Image (push) Has been skipped
CI/CD Pipeline / CI Gate (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Build Staging API Image (push) Successful in 12m7s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 32s
CI/CD Pipeline / ACR Image Cleanup (push) Successful in 34s
CI/CD Pipeline / Staging E2E Tests (push) Failing after 1m39s
CI/CD Pipeline / Staging API Integration Tests (push) Successful in 3m58s
CI/CD Pipeline / Canary Release to Production (push) Has been skipped
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / PR Build API Image (push) Has been skipped
CI/CD Pipeline / PR Build Worker Image (push) Has been skipped
CI/CD Pipeline / PR Build Web Image (push) Has been skipped
CI/CD Pipeline / Validate - Type Check (mypy) (push) Successful in 59s
CI/CD Pipeline / Validate - Migration (alembic) (push) Successful in 1m3s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 3m16s
CI/CD Pipeline / Build Staging Web Image (push) Successful in 3m21s
CI/CD Pipeline / Validate - Code Quality (push) Successful in 5m2s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 5m14s
CI/CD Pipeline / Integration Tests (push) Successful in 1m19s
CI/CD Pipeline / Unit Tests (push) Successful in 8m47s
CI/CD Pipeline / Build Production API Image (push) Has been skipped
CI/CD Pipeline / Build Production Web Image (push) Has been skipped
CI/CD Pipeline / Build Production Worker Image (push) Has been skipped
CI/CD Pipeline / CI Gate (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Build Staging API Image (push) Successful in 12m7s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 32s
CI/CD Pipeline / ACR Image Cleanup (push) Successful in 34s
CI/CD Pipeline / Staging E2E Tests (push) Failing after 1m39s
CI/CD Pipeline / Staging API Integration Tests (push) Successful in 3m58s
CI/CD Pipeline / Canary Release to Production (push) Has been skipped
This commit was merged in pull request #1207.
This commit is contained in:
@@ -7,8 +7,8 @@ from app.api.routes.chunked_upload import router as chunked_upload_router
|
||||
from app.api.routes.classification_jobs import router as classification_jobs_router
|
||||
from app.api.routes.duplication import router as duplication_router
|
||||
from app.api.routes.feature_flags import router as feature_flags_router
|
||||
from app.api.routes.generation_tasks import router as generation_tasks_router
|
||||
from app.api.routes.generation_preview import router as generation_preview_router
|
||||
from app.api.routes.generation_tasks import router as generation_tasks_router
|
||||
from app.api.routes.health import router as health_check_router
|
||||
from app.api.routes.ingest_jobs import router as ingest_jobs_router
|
||||
from app.api.routes.internal_render import router as internal_render_router
|
||||
|
||||
@@ -6408,4 +6408,3 @@
|
||||
padding: 16px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
@@ -187,9 +187,8 @@ class TestCreatePreviewGenerationTaskRequest:
|
||||
|
||||
def test_missing_template_id_raises(self):
|
||||
"""缺少 template_id 报错"""
|
||||
from pydantic import ValidationError
|
||||
|
||||
from app.schemas.generation_task import CreatePreviewGenerationTaskRequest
|
||||
from pydantic import ValidationError
|
||||
|
||||
with pytest.raises(ValidationError, match="template_id"):
|
||||
CreatePreviewGenerationTaskRequest(
|
||||
@@ -199,9 +198,8 @@ class TestCreatePreviewGenerationTaskRequest:
|
||||
|
||||
def test_missing_template_id_not_provided_raises(self):
|
||||
"""完全不提供 template_id 报错"""
|
||||
from pydantic import ValidationError
|
||||
|
||||
from app.schemas.generation_task import CreatePreviewGenerationTaskRequest
|
||||
from pydantic import ValidationError
|
||||
|
||||
with pytest.raises(ValidationError):
|
||||
CreatePreviewGenerationTaskRequest(
|
||||
@@ -210,9 +208,8 @@ class TestCreatePreviewGenerationTaskRequest:
|
||||
|
||||
def test_empty_asset_ids_raises(self):
|
||||
"""asset_ids/title_ids/voice_ids 全空报错"""
|
||||
from pydantic import ValidationError
|
||||
|
||||
from app.schemas.generation_task import CreatePreviewGenerationTaskRequest
|
||||
from pydantic import ValidationError
|
||||
|
||||
with pytest.raises(ValidationError, match="asset_ids"):
|
||||
CreatePreviewGenerationTaskRequest(
|
||||
@@ -562,20 +559,20 @@ class TestPreviewTaskStatusFlow:
|
||||
# ═══════════════════════════════════════════════════════════════════════════════
|
||||
|
||||
from dataclasses import dataclass
|
||||
from unittest.mock import patch, PropertyMock
|
||||
from unittest.mock import PropertyMock, patch
|
||||
|
||||
# 导入路由模块和被测函数
|
||||
from app.api.routes.generation_preview import (
|
||||
PREVIEW_RESOLUTION,
|
||||
_to_preview_response,
|
||||
create_preview_generation_task,
|
||||
get_preview_generation_task,
|
||||
PREVIEW_RESOLUTION,
|
||||
)
|
||||
from app.core.task_enqueue import GlobalQueueFull, UserPendingLimitExceeded
|
||||
from app.schemas.generation_task import (
|
||||
CreatePreviewGenerationTaskRequest,
|
||||
PreviewGenerationTaskResponse,
|
||||
)
|
||||
from app.core.task_enqueue import GlobalQueueFull, UserPendingLimitExceeded
|
||||
|
||||
|
||||
def _make_user(user_id="test_user_001"):
|
||||
|
||||
Reference in New Issue
Block a user