From d5ecb86ff6311dc432ffd83f327161072ce3d128 Mon Sep 17 00:00:00 2001 From: Bert Verstraete Date: Mon, 3 Jun 2024 16:46:11 +0200 Subject: [PATCH] fix test --- tests/tests_integration/test_api/test_data_workflows.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/tests_integration/test_api/test_data_workflows.py b/tests/tests_integration/test_api/test_data_workflows.py index dd49d385e9..a327cb93eb 100644 --- a/tests/tests_integration/test_api/test_data_workflows.py +++ b/tests/tests_integration/test_api/test_data_workflows.py @@ -375,13 +375,13 @@ def test_list_workflow_executions_by_status( # the new execution should not be completed yet, but running listed_completed = cognite_client.workflows.executions.list( - workflow_version_ids=add_multiply_workflow.as_id(), status=["completed"], limit=3 + workflow_version_ids=add_multiply_workflow.as_id(), statuses=["completed"], limit=3 ) listed_running = cognite_client.workflows.executions.list( - workflow_version_ids=add_multiply_workflow.as_id(), status=["running"], limit=3 + workflow_version_ids=add_multiply_workflow.as_id(), statuses=["running"], limit=3 ) - assert filter(lambda x: x.id == result.id, listed_completed) == [] - assert len(filter(lambda x: x.id == result.id, listed_running)) == 1 + assert not any(x.id == result.id for x in listed_completed) + assert sum(1 for x in listed_running if x.id == result.id) == 1 def test_retrieve_workflow_execution_detailed( self,