Skip to content

Commit f4804d7

Browse files
committed
test: mock failure node to None if not specified
-e Signed-off-by: machichima <nary12321@gmail.com>
1 parent f0897be commit f4804d7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/flytekit/unit/remote/test_remote.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ def test_remote_fetch_execution(remote):
120120
)
121121
mock_client = MagicMock()
122122
mock_client.get_execution.return_value = admin_workflow_execution
123+
mock_client.get_workflow.return_value.closure.compiled_workflow.primary.template.failure_node = None
123124
remote._client = mock_client
124125
flyte_workflow_execution = remote.fetch_execution(name="n1")
125126
assert flyte_workflow_execution.id == admin_workflow_execution.id
@@ -552,6 +553,7 @@ def mock_flyte_remote_client():
552553
with patch("flytekit.remote.remote.FlyteRemote.client") as mock_flyte_remote_client:
553554
mock_flyte_remote_client.get_task.return_value.closure.compiled_task.template.sql = None
554555
mock_flyte_remote_client.get_task.return_value.closure.compiled_task.template.k8s_pod = None
556+
mock_flyte_remote_client.get_workflow.return_value.closure.compiled_workflow.primary.template.failure_node = None
555557
yield mock_flyte_remote_client
556558

557559

0 commit comments

Comments
 (0)