Skip to content

Commit e37d5a1

Browse files
committed
fixup! feat: Adds a way to find the difference in Meiliseach state and come up with a migration plan and configuration plan depending on the state. This introduces a mechanism it or a drift engine which drill down the Meiliseach configuration and figures out what has changed:
1 parent d651af9 commit e37d5a1

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

openedx/core/djangoapps/content/search/tests/test_reconcile.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
from unittest.mock import MagicMock, Mock, patch
77

8+
import pytest
89
from django.test import TestCase, override_settings
910
from meilisearch.errors import MeilisearchError
1011

@@ -303,7 +304,7 @@ def test_raises_on_task_failure(self, mock_wait, mock_meilisearch):
303304
"""MeilisearchError is raised if a task fails."""
304305
mock_wait.side_effect = MeilisearchError("Task failed")
305306

306-
with self.assertRaises(MeilisearchError):
307+
with pytest.raises(MeilisearchError):
307308
_apply_settings_with_waits("test_index")
308309

309310

@@ -468,7 +469,7 @@ def test_index_populated_wrong_pk(self, mock_reset, mock_drift, mock_meilisearch
468469
def test_meilisearch_disabled(self, mock_meilisearch):
469470
"""When Meilisearch is disabled, reconcile_index raises RuntimeError (from client)."""
470471
api.clear_meilisearch_client()
471-
with self.assertRaises(RuntimeError):
472+
with pytest.raises(RuntimeError):
472473
reconcile_index()
473474

474475

0 commit comments

Comments
 (0)