mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-10-17 05:18:12 +00:00
Chore: Move the search tests onto the shared indexing fixtures (#14159)
This commit is contained in:
1 parent
20d309a413
commit
fdd32b73bb
24 files changed
+410
-606
No files matched your search
@@ -16,22 +16,12 @@ import pytest
|
||||
if TYPE_CHECKING:
|
||||
from collections.abc import Callable
|
||||
|
||||
from pytest_django.fixtures import SettingsWrapper
|
||||
|
||||
from documents.models import Document
|
||||
|
||||
|
||||
pytestmark = [pytest.mark.search, pytest.mark.django_db]
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def fuzzy_enabled(settings: SettingsWrapper) -> None:
|
||||
"""Enable the fuzzy blend clause. The threshold doubles as a minimum
|
||||
score filter, so it is set to 0.0: every hit passes and the test sees
|
||||
the clause's matching behaviour, not the filter's."""
|
||||
settings.ADVANCED_FUZZY_SEARCH_THRESHOLD = 0.0
|
||||
|
||||
|
||||
class TestNegationConstrainsEveryClause:
|
||||
@pytest.mark.usefixtures("fuzzy_enabled")
|
||||
def test_fuzzy_clause_does_not_readmit_an_excluded_document(
|
||||
|
||||
Reference in new issue
Block a user