#NEWLINE# def test_worker_sends_interim_result_for_last_speech_in_splitted_chunks( self ) : #NEWLINE# #INDENT# self . audio . set_chunks ( [ 'chunk 1' , 'chunk 2' ] ) #NEWLINE# self . vad . set_messages ( [ ( True , None , 'chunk 1' , 'resampled chunk 1' ) , ( True , None , 'chunk 2' , 'resampled chunk 2' ) ] ) #NEWLINE# messages = [ { #NEWLINE# #INDENT# 'frontend' : self . make_frontend_request ( 'speech 1' , 'ONLINE' , id = 1 , has_next = True ) , #NEWLINE# #UNINDENT# } ] #NEWLINE# self . run_worker ( messages ) #NEWLINE# expected_messages = createResultsMessage ( [ ( 0 , False , [ ( 1.0 , 'Interim result' ) ] ) ] ) #NEWLINE# self . assertThatMessagesWereSendToFrontend ( [ expected_messages ] )