#NEWLINE# @ mock . patch . object ( chronos . ChronosClient , 'run' ) #NEWLINE# def test_run( mock_chronos_client , runner ) : #NEWLINE# #INDENT# mock_chronos_client . return_value = True #NEWLINE# result = runner ( [ 'cron' , 'run' , 'test-job' ] , env = { #NEWLINE# #INDENT# 'SHPKPR_CHRONOS_URL' : 'chronos.somedomain.com:4400' , #NEWLINE# #UNINDENT# } ) #NEWLINE# mock_chronos_client . assert_called_with ( 'test-job' ) #NEWLINE# assert ( result . exit_code == 0 )