#NEWLINE# def test_add_job_return_value( self , scheduler , timezone ) : #NEWLINE# #INDENT# 'Test that when a job is added to a stopped scheduler, a Job instance is returned.' #NEWLINE# job = scheduler . add_job ( ( lambda x , y : None ) , 'date' , [ 1 ] , { #NEWLINE# #INDENT# 'y' : 2 , #NEWLINE# #UNINDENT# } , 'my-id' , 'dummy' , next_run_time = datetime ( 2014 , 5 , 23 , 10 ) , run_date = '2014-06-01 08:41:00' ) #NEWLINE# assert isinstance ( job , Job ) #NEWLINE# assert ( job . id == 'my-id' ) #NEWLINE# assert ( not hasattr ( job , 'misfire_grace_time' ) ) #NEWLINE# assert ( not hasattr ( job , 'coalesce' ) ) #NEWLINE# assert ( not hasattr ( job , 'max_instances' ) ) #NEWLINE# assert ( job . next_run_time . tzinfo . zone == timezone . zone )