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