mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-20 21:18:13 +02:00
test: mock span chunker in integration fixtures
This commit is contained in:
parent
60fff66ee0
commit
12e948cad1
1 changed files with 5 additions and 6 deletions
|
|
@ -158,13 +158,12 @@ def patched_embed_texts_raises(monkeypatch) -> MagicMock:
|
|||
|
||||
@pytest.fixture
|
||||
def patched_chunk_text(monkeypatch) -> MagicMock:
|
||||
mock = MagicMock(return_value=["Test chunk content."])
|
||||
from app.indexing_pipeline.document_chunker import ChunkSlice
|
||||
|
||||
text = "Test chunk content."
|
||||
mock = MagicMock(return_value=[ChunkSlice(text, 0, len(text))])
|
||||
monkeypatch.setattr(
|
||||
"app.indexing_pipeline.cache.cached_indexing.chunk_text",
|
||||
mock,
|
||||
)
|
||||
monkeypatch.setattr(
|
||||
"app.indexing_pipeline.cache.cached_indexing.chunk_text_hybrid",
|
||||
"app.indexing_pipeline.cache.cached_indexing.chunk_markdown_with_spans",
|
||||
mock,
|
||||
)
|
||||
return mock
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue