mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 16:56:22 +02:00
fix: plug all gaps found in deep review of indexing pipeline
This commit is contained in:
parent
46c7ccd70b
commit
5b616eac5a
7 changed files with 183 additions and 6 deletions
15
surfsense_backend/tests/unit/indexing_pipeline/conftest.py
Normal file
15
surfsense_backend/tests/unit/indexing_pipeline/conftest.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import pytest
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def patched_chunker_instance(mocker):
|
||||
mock = mocker.patch("app.indexing_pipeline.document_chunker.config.chunker_instance")
|
||||
mock.chunk.return_value = [mocker.Mock(text="prose chunk")]
|
||||
return mock
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def patched_code_chunker_instance(mocker):
|
||||
mock = mocker.patch("app.indexing_pipeline.document_chunker.config.code_chunker_instance")
|
||||
mock.chunk.return_value = [mocker.Mock(text="code chunk")]
|
||||
return mock
|
||||
Loading…
Add table
Add a link
Reference in a new issue