#NEWLINE# @ patch . object ( batchworker . ProgressReporter , 'next_progress_report_interval' ) #NEWLINE# @ patch . object ( batchworker . ProgressReporter , 'process_report_status_response' ) #NEWLINE# def test_progress_reporter_reports_progress( self , mock_report_response , mock_next_progress ) : #NEWLINE# #INDENT# work_item = workitem . BatchWorkItem ( proto = mock . MagicMock ( ) , map_task = mock . MagicMock ( ) ) #NEWLINE# mock_work_executor = mock . MagicMock ( ) #NEWLINE# mock_batch_worker = mock . MagicMock ( ) #NEWLINE# mock_client = mock . MagicMock ( ) #NEWLINE# mock_next_progress . return_value = 1 #NEWLINE# progress_reporter = batchworker . ProgressReporter ( work_item , mock_work_executor , mock_batch_worker , mock_client ) #NEWLINE# progress_reporter . start_reporting_progress ( ) #NEWLINE# time . sleep ( 10 ) #NEWLINE# progress_reporter . stop_reporting_progress ( ) #NEWLINE# mock_client . report_status . assert_called_with ( mock . ANY , mock . ANY , mock . ANY , mock . ANY , mock . ANY , mock . ANY , mock . ANY )