mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-07-10 22:32:16 +02:00
fix: update upload conftest mock to span-aware chunker
This commit is contained in:
parent
cfc3be5b1f
commit
31a14190e3
1 changed files with 5 additions and 2 deletions
|
|
@ -286,9 +286,12 @@ def _mock_external_apis(monkeypatch):
|
||||||
"app.indexing_pipeline.cache.cached_indexing.embed_texts",
|
"app.indexing_pipeline.cache.cached_indexing.embed_texts",
|
||||||
MagicMock(side_effect=lambda texts: [[0.1] * _EMBEDDING_DIM for _ in texts]),
|
MagicMock(side_effect=lambda texts: [[0.1] * _EMBEDDING_DIM for _ in texts]),
|
||||||
)
|
)
|
||||||
|
from app.indexing_pipeline.document_chunker import ChunkSlice
|
||||||
|
|
||||||
|
chunk = "Test chunk content."
|
||||||
monkeypatch.setattr(
|
monkeypatch.setattr(
|
||||||
"app.indexing_pipeline.cache.cached_indexing.chunk_text",
|
"app.indexing_pipeline.cache.cached_indexing.chunk_markdown_with_spans",
|
||||||
MagicMock(return_value=["Test chunk content."]),
|
MagicMock(return_value=[ChunkSlice(chunk, 0, len(chunk))]),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue