#NEWLINE# def test_stop_job_with_no_status( self ) : #NEWLINE# #INDENT# job_doc = { #NEWLINE# #INDENT# 'job_schedule' : { #NEWLINE# #INDENT# 'status' : '' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# job = v1_jobs . Job ( job_doc ) #NEWLINE# res = job . stop ( ) #NEWLINE# self . assertEquals ( job , 'success' ) #NEWLINE# self . assertEqual ( job . doc [ 'job_schedule' ] [ 'status' ] , '' ) #NEWLINE# self . assertEqual ( job . doc [ 'job_schedule' ] [ 'event' ] , 'stop' ) #NEWLINE# self . assertTrue ( job . need_update )