#NEWLINE# def test_modify_job( self ) : #NEWLINE# #INDENT# headers = { #NEWLINE# #INDENT# 'Content-Type' : 'application/json; charset=UTF-8' , #NEWLINE# #UNINDENT# } #NEWLINE# data = { #NEWLINE# #INDENT# 'job_class_string' : 'hello.world' , #NEWLINE# 'name' : 'hello world job' , #NEWLINE# 'minute' : '*/5' , #NEWLINE# #UNINDENT# } #NEWLINE# response = self . fetch ( self . JOBS_URL , method = 'POST' , headers = headers , body = json . dumps ( data ) ) #NEWLINE# return_info = json . loads ( response . body ) #NEWLINE# self . assertTrue ( ( 'job_id' in return_info ) ) #NEWLINE# self . assertEquals ( len ( return_info [ 'job_id' ] ) , 32 ) #NEWLINE# job = self . scheduler . get_job ( return_info [ 'job_id' ] ) #NEWLINE# self . assertEquals ( utils . get_job_name ( job ) , data [ 'job_class_string' ] ) #NEWLINE# self . assertEquals ( job . name , data [ 'name' ] ) #NEWLINE# headers = { #NEWLINE# #INDENT# 'Content-Type' : 'application/json; charset=UTF-8' , #NEWLINE# #UNINDENT# } #NEWLINE# data = { #NEWLINE# #INDENT# 'job_class_string' : 'hello.world!!!!' , #NEWLINE# 'name' : 'hello world job~~~~' , #NEWLINE# 'minute' : '*/100' , #NEWLINE# #UNINDENT# } #NEWLINE# response = self . fetch ( ( ( ( self . JOBS_URL + '/' ) + return_info [ 'job_id' ] ) + '?sync=true' ) , method = 'PUT' , headers = headers , body = json . dumps ( data ) ) #NEWLINE# self . assertEquals ( response . code , 200 ) #NEWLINE# job = self . scheduler . get_job ( return_info [ 'job_id' ] ) #NEWLINE# self . assertEquals ( utils . get_job_name ( job ) , data [ 'job_class_string' ] ) #NEWLINE# self . assertEquals ( job . name , data [ 'name' ] )