File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -260,10 +260,15 @@ async def test_vectorise_no_embeddings(mock_config):
260260 mock_chunker = MagicMock ()
261261 mock_chunker .chunk .return_value = [MagicMock (text = "chunk1" )]
262262 connector .get_embedding = MagicMock (return_value = [])
263- stats = await connector .vectorise (
264- os .path .join (mock_config .project_root , "file1" ), chunker = mock_chunker
265- )
266- assert stats .skipped == 1
263+ with patch (
264+ "vectorcode.database.chroma0.ChromaDB0Connector._create_or_get_collection" ,
265+ new_callable = AsyncMock ,
266+ ) as mock_create_collection :
267+ stats = await connector .vectorise (
268+ os .path .join (mock_config .project_root , "file1" ), chunker = mock_chunker
269+ )
270+ assert stats .skipped == 1
271+ mock_create_collection .assert_called_once ()
267272
268273
269274@pytest .mark .asyncio
You can’t perform that action at this time.
0 commit comments