#NEWLINE# @ mock . patch ( 'elasticsearch.helpers._process_bulk_chunk' , return_value = [ ] ) #NEWLINE# def test_all_chunks_sent( self , _process_bulk_chunk ) : #NEWLINE# #INDENT# actions = ( { #NEWLINE# #INDENT# 'x' : i , #NEWLINE# #UNINDENT# } for i in range ( 100 ) ) #NEWLINE# list ( helpers . parallel_bulk ( Elasticsearch ( ) , actions , chunk_size = 2 ) ) #NEWLINE# self . assertEquals ( 50 , _process_bulk_chunk . call_count )