#NEWLINE# @ mock . patch ( 'sahara.conductor.API.job_get' ) #NEWLINE# @ mock . patch ( 'sahara.conductor.API.job_execution_get' ) #NEWLINE# @ mock . patch ( 'sahara.conductor.API.cluster_get' ) #NEWLINE# @ mock . patch ( 'sahara.service.edp.base_engine.JobEngine.suspend_job' ) #NEWLINE# def test_suspend_unsuspendible_job( self , suspend_job_get , cluster_get , job_exec_get , job_get ) : #NEWLINE# #INDENT# info = { #NEWLINE# #INDENT# 'status' : edp . JOB_STATUS_SUCCEEDED , #NEWLINE# #UNINDENT# } #NEWLINE# ( job , job_exec ) = u . create_job_exec ( edp . JOB_TYPE_PIG , None , False , info ) #NEWLINE# job_exec_get . return_value = job_exec #NEWLINE# job_get . return_value = job #NEWLINE# cluster = u . create_cluster ( ) #NEWLINE# cluster . status = 'Active' #NEWLINE# cluster_get . return_value = cluster #NEWLINE# self . assertEqual ( 0 , self . call_count )