From b0cdb91147613778551e67517a7facc7556d33ff Mon Sep 17 00:00:00 2001 From: crayon <873217631@qq.com> Date: Thu, 12 Oct 2023 22:33:40 +0800 Subject: [PATCH] minor: review fix --- gcloud/tests/taskflow3/tasks/test_send_taskflow_message.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/gcloud/tests/taskflow3/tasks/test_send_taskflow_message.py b/gcloud/tests/taskflow3/tasks/test_send_taskflow_message.py index f41f8664f9..1b53912dbd 100644 --- a/gcloud/tests/taskflow3/tasks/test_send_taskflow_message.py +++ b/gcloud/tests/taskflow3/tasks/test_send_taskflow_message.py @@ -36,7 +36,6 @@ def generate_taskflow(cls): def test_send_taskflow_message(self): - get_task_status = MagicMock() taskflow = MagicMock() taskflow.id = 1 taskflow_model = MagicMock() @@ -44,12 +43,10 @@ def test_send_taskflow_message(self): send_task_flow_message = MagicMock() with patch(TASKFLOW_TASKS_TASKFLOW_INSTANCE, taskflow_model): - with patch(TASKFLOW_TASKS_TASK_COMMAND_DISPATCHER_GET_STATUS, get_task_status): - with patch(TASKFLOW_TASKS_SEND_TASK_FLOW_MESSAGE, send_task_flow_message): - send_taskflow_message(taskflow.id, ATOM_FAILED, node_name="test") + with patch(TASKFLOW_TASKS_SEND_TASK_FLOW_MESSAGE, send_task_flow_message): + send_taskflow_message(taskflow.id, ATOM_FAILED, node_name="test") send_task_flow_message.assert_called_once_with(taskflow, ATOM_FAILED, "test") - get_task_status.assert_not_called() taskflow_model.objects.get.assert_called_once_with(id=taskflow.id) def test_send_taskflow_message__use_root(self):