diff --git a/backend/tests/baserow/contrib/automation/workflows/test_workflow_handler.py b/backend/tests/baserow/contrib/automation/workflows/test_workflow_handler.py index d66e839759..88da77976a 100644 --- a/backend/tests/baserow/contrib/automation/workflows/test_workflow_handler.py +++ b/backend/tests/baserow/contrib/automation/workflows/test_workflow_handler.py @@ -1166,12 +1166,15 @@ def test_async_start_workflow_rate_limited_runs_eventually_disable_workflow( histories = list( AutomationWorkflowHistory.objects.filter(workflow=original_workflow).order_by( - "started_on" + "started_on", "id" ) ) assert len(histories) == 6 + # We should have 6 successful call + assert mock_start_workflow_celery_task.delay.call_count == 2 + assert histories[2].status == HistoryStatusChoices.ERROR assert histories[2].message == ( "The workflow was rate limited due to too many recent or unfinished runs." @@ -1191,9 +1194,6 @@ def test_async_start_workflow_rate_limited_runs_eventually_disable_workflow( "The workflow was disabled due to too many consecutive errors." ) - # We should have 6 successful call - assert mock_start_workflow_celery_task.delay.call_count == 2 - original_workflow.refresh_from_db() published_workflow.refresh_from_db()