#NEWLINE# def _do_test_job( self , job_close_reason , expected_close_reason ) : #NEWLINE# #INDENT# p = self . panelproject #NEWLINE# pushed = p . jobq . push ( self . spidername ) #NEWLINE# job = p . get_job ( pushed [ 'key' ] ) #NEWLINE# self . assertEqual ( job . metadata . get ( 'state' ) , 'pending' ) #NEWLINE# self . _run_runner ( pushed , close_reason = job_close_reason ) #NEWLINE# job = p . get_job ( pushed [ 'key' ] ) #NEWLINE# self . assertEqual ( job . metadata . get ( 'state' ) , 'finished' ) #NEWLINE# self . assertEqual ( job . metadata . get ( 'close_reason' ) , expected_close_reason ) #NEWLINE# return job