Skip to content

Commit

Permalink
Fix flaky test depending on DB ordering (#4907)
Browse files Browse the repository at this point in the history
  • Loading branch information
matiasb authored Aug 22, 2024
1 parent cd5e995 commit 6692536
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions engine/apps/grafana_plugin/tests/test_sync.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from unittest.mock import patch
from unittest.mock import ANY, patch

import pytest
from django.conf import settings
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 6692536

Please sign in to comment.