From 23ef50ccc03796b4bd47d903097bf92bc6721528 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=81=B5=E5=BA=94?= Date: Thu, 9 Jul 2026 11:53:39 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E4=BF=AE=E5=A4=8Disort=20import?= =?UTF-8?q?=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/integration/test_classification_api.py | 5 ++--- tests/integration/test_ingest_api.py | 5 ++--- tests/unit/test_payment_callback.py | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/tests/integration/test_classification_api.py b/tests/integration/test_classification_api.py index e2f38ad2a..9d466c423 100644 --- a/tests/integration/test_classification_api.py +++ b/tests/integration/test_classification_api.py @@ -25,15 +25,14 @@ from fastapi.testclient import TestClient sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "..", "apps", "api")) +# mock celery_app 以避免实际发送任务 +import app.api.routes.classification_jobs as classification_routes from app.api.routes.classification_jobs import router from app.dependencies import get_classification_job_repository from packages.adapters.in_memory import InMemoryClassificationJobRepository from packages.domain import ClassificationJob, ClassificationJobStatus -# mock celery_app 以避免实际发送任务 -import app.api.routes.classification_jobs as classification_routes - classification_routes.celery_app = MagicMock() diff --git a/tests/integration/test_ingest_api.py b/tests/integration/test_ingest_api.py index 96d6087d6..2167e0b8a 100644 --- a/tests/integration/test_ingest_api.py +++ b/tests/integration/test_ingest_api.py @@ -25,15 +25,14 @@ from fastapi.testclient import TestClient sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "..", "apps", "api")) +# mock celery_app 以避免实际发送任务 +import app.api.routes.ingest_jobs as ingest_routes from app.api.routes.ingest_jobs import router from app.dependencies import get_ingest_job_repository from packages.adapters.in_memory import InMemoryIngestJobRepository from packages.domain import IngestJob, IngestJobStatus -# mock celery_app 以避免实际发送任务 -import app.api.routes.ingest_jobs as ingest_routes - ingest_routes.celery_app = MagicMock() diff --git a/tests/unit/test_payment_callback.py b/tests/unit/test_payment_callback.py index da7711d50..4b9beec51 100644 --- a/tests/unit/test_payment_callback.py +++ b/tests/unit/test_payment_callback.py @@ -31,7 +31,7 @@ from fastapi.testclient import TestClient sys.path.insert(0, str(Path(__file__).resolve().parents[2] / "apps" / "api")) -from app.api.routes.subscription import router, _get_plan_name, _get_plan_price +from app.api.routes.subscription import _get_plan_name, _get_plan_price, router # --------------------------------------------------------------------------- # 1. Mock Billing Repository