#NEWLINE# def test_basic( self ) : #NEWLINE# #INDENT# self . _ls_history_logs . return_value = [ dict ( path = 'hdfs:///history/history.jhist' ) ] #NEWLINE# results = self . runner . _ls_history_logs ( job_id = 'job_1' , output_dir = 'hdfs:///output/' ) #NEWLINE# self . assertFalse ( self . log . info . called ) #NEWLINE# self . assertEqual ( next ( results ) , dict ( path = 'hdfs:///history/history.jhist' ) ) #NEWLINE# self . runner . _stream_history_log_dirs . assert_called_once_with ( output_dir = 'hdfs:///output/' ) #NEWLINE# self . _ls_history_logs . assert_called_once_with ( self . runner . fs , self . runner . _stream_history_log_dirs . return_value , job_id = 'job_1' ) #NEWLINE# self . assertEqual ( self . log . info . call_count , 1 ) #NEWLINE# self . assertIn ( 'hdfs:///history/history.jhist' , self . log . info . call_args [ 0 ] [ 0 ] ) #NEWLINE# self . assertRaises ( StopIteration , next , results )