diff --git a/sql/test_archiver.py b/sql/test_archiver.py index 3a56730006..29c5edecdc 100644 --- a/sql/test_archiver.py +++ b/sql/test_archiver.py @@ -248,8 +248,8 @@ def test_archive_apply_auto_pass(self, mock_generate_setting): assert archive_config.status == WorkflowStatus.PASSED @patch("sql.utils.workflow_audit.AuditV2.operate") - @patch("sql.archiver.async_task") - def test_archive_audit(self, _async_task, mock_operate): + @patch("sql.views.notify_for_audit.apply_async") + def test_archive_audit(self, mock_apply_async, mock_operate): """ 测试审核归档实例数据 :return: @@ -272,7 +272,6 @@ def test_archive_audit(self, _async_task, mock_operate): assert self.archive_apply.state == True assert self.archive_apply.status == WorkflowStatus.PASSED - @patch('sql.archiver.add_archive_task.apply_async') def test_add_archive_task(self, mock_apply_async): # 调用 add.apply_async