#NEWLINE# def test_broad( self ) : #NEWLINE# #INDENT# project = self . hsclient . get_project ( self . projectid ) #NEWLINE# job = project . push_job ( self . spidername ) #NEWLINE# self . assertEqual ( job . metadata . get ( 'state' ) , 'pending' ) #NEWLINE# job = self . start_job ( ) #NEWLINE# self . assertEqual ( job . metadata . get ( 'state' ) , 'running' ) #NEWLINE# job . items . write ( { #NEWLINE# #INDENT# 'title' : 'bar' , #NEWLINE# #UNINDENT# } ) #NEWLINE# job . logs . info ( 'nice to meet you' ) #NEWLINE# job . samples . write ( [ 1 , 2 , 3 ] ) #NEWLINE# job . close_writers ( ) #NEWLINE# job . jobq . finish ( job ) #NEWLINE# jobid = job . key #NEWLINE# jobauth = job . auth #NEWLINE# del job #NEWLINE# self . assertTrue ( list ( project . items . list ( self . spiderid , count = 1 ) ) ) #NEWLINE# self . assertTrue ( list ( project . logs . list ( self . spiderid , count = 1 ) ) ) #NEWLINE# self . assertTrue ( list ( project . samples . list ( self . spiderid , count = 1 ) ) ) #NEWLINE# job = project . client . get_job ( jobid , jobauth = jobauth ) #NEWLINE# job . purged ( )