From 66925366a669c378d7c6ebcacecaa102fb113b10 Mon Sep 17 00:00:00 2001 From: Matias Bordese Date: Thu, 22 Aug 2024 15:56:59 -0300 Subject: [PATCH] Fix flaky test depending on DB ordering (#4907) See https://github.com/grafana/oncall/actions/runs/10513279782/job/29128524241 --- engine/apps/grafana_plugin/tests/test_sync.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engine/apps/grafana_plugin/tests/test_sync.py b/engine/apps/grafana_plugin/tests/test_sync.py index ddf93d37..6c33d700 100644 --- a/engine/apps/grafana_plugin/tests/test_sync.py +++ b/engine/apps/grafana_plugin/tests/test_sync.py @@ -1,4 +1,4 @@ -from unittest.mock import patch +from unittest.mock import ANY, patch import pytest from django.conf import settings @@ -58,8 +58,8 @@ def test_start_sync_organization_filter(make_organization): with patch("apps.grafana_plugin.tasks.sync.sync_organization_async.apply_async") as mock_sync: start_sync_organizations() assert mock_sync.call_count == 2 - mock_sync.assert_any_call((org2.pk,), countdown=0) - mock_sync.assert_any_call((org3.pk,), countdown=1) + mock_sync.assert_any_call((org2.pk,), countdown=ANY) + mock_sync.assert_any_call((org3.pk,), countdown=ANY) @pytest.mark.django_db