mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-10-08 17:17:14 +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
@@ -24,16 +24,6 @@ if TYPE_CHECKING:
|
||||
pytestmark = pytest.mark.search
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def query_index() -> tantivy.Index:
|
||||
"""An in-memory, unstemmed index shared read-only across this module's
|
||||
parse-only tests (none of them index documents)."""
|
||||
schema = build_schema()
|
||||
idx = tantivy.Index(schema, path=None)
|
||||
register_tokenizers(idx, "")
|
||||
return idx
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def populated_index() -> tantivy.Index:
|
||||
"""An index holding one document, so a query matching nothing is
|
||||
|
||||
Reference in new issue
Block a user