From 766406ebb5e509b093eb67e789a907ef802fab6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=81=B5=E5=BA=94?= Date: Thu, 9 Jul 2026 14:35:28 +0800 Subject: [PATCH] =?UTF-8?q?test(ci):=20=E5=85=A8=E5=B1=80mock=20Celery?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=EF=BC=8CCI=E7=8E=AF=E5=A2=83=E6=97=A0Redis?= =?UTF-8?q?=E6=97=B6=E9=81=BF=E5=85=8D=E8=BF=9E=E6=8E=A5=E8=B6=85=E6=97=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/conftest.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 852aa4178..22b851da5 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -22,8 +22,7 @@ from unittest.mock import MagicMock, patch def _mock_celery_task(): """全局 mock Celery 任务的 delay/apply_async/send_task 方法。""" - from celery import Task - from celery import Celery + from celery import Celery, Task # 保存原始方法 _orig_delay = Task.delay