Chore: Move the search tests onto the shared indexing fixtures (#14159)

This commit is contained in:
Trenton H authored and GitHub committed 2026-09-17 14:55:13 -07:00
1 parent 20d309a413
commit fdd32b73bb
24 files changed
+410 -606

No files matched your search

+12
View File
@@ -182,3 +182,15 @@ def faker_session_locale():
@pytest.fixture(scope="session", autouse=True)
def faker_seed():
return 12345
@pytest.fixture
def indexed_document(_search_index: None) -> "Document":
"""One searchable document, for tests about what the search endpoint
returns rather than about what it finds.
"""
from documents.search import get_backend
doc = DocumentFactory.create(title="quarterly invoice", content="acme corp")
get_backend().add_or_update(doc)
return doc