Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand All @@ -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()

Expand Down
Loading