@@ -221,12 +221,11 @@ def test_process_chunks_batch_success(
221221 result = command .process_chunks_batch ([mock_entity ])
222222
223223 assert result == 1
224- mock_create_chunks .assert_called_once_with (
225- chunk_texts = ["chunk1" , "chunk2" , "chunk3" ],
226- context = mock_context ,
227- openai_client = command .openai_client ,
228- save = False ,
229- )
224+ _ , kwargs = mock_create_chunks .call_args
225+ assert set (kwargs ["chunk_texts" ]) == {"chunk1" , "chunk2" , "chunk3" }
226+ assert kwargs ["context" ] == mock_context
227+ assert kwargs ["openai_client" ] == command .openai_client
228+ assert kwargs ["save" ] is False
230229 mock_bulk_save .assert_called_once_with (mock_chunks )
231230 mock_write .assert_has_calls (
232231 [
@@ -461,12 +460,11 @@ def test_process_chunks_batch_with_duplicates(
461460
462461 assert result == 1
463462 mock_split_text .assert_called_once ()
464- mock_create_chunks .assert_called_once_with (
465- chunk_texts = ["chunk1" , "chunk2" , "chunk3" ],
466- context = mock_context ,
467- openai_client = command .openai_client ,
468- save = False ,
469- )
463+ _ , kwargs = mock_create_chunks .call_args
464+ assert set (kwargs ["chunk_texts" ]) == {"chunk1" , "chunk2" , "chunk3" }
465+ assert kwargs ["context" ] == mock_context
466+ assert kwargs ["openai_client" ] == command .openai_client
467+ assert kwargs ["save" ] is False
470468 mock_bulk_save .assert_called_once_with (mock_chunks )
471469
472470 def test_process_chunks_batch_whitespace_only_content (
0 commit comments