#NEWLINE# @ mock . patch ( 'paasta_tools.chronos_tools.lookup_chronos_jobs' , autospec = True ) #NEWLINE# @ mock . patch ( 'paasta_tools.chronos_tools.get_chronos_client' , autospec = True ) #NEWLINE# @ mock . patch ( 'paasta_tools.chronos_tools.load_chronos_config' , autospec = True ) #NEWLINE# def test_find_matching_parent_job( self , mock_load_chronos_config , mock_get_chronos_client , mock_lookup_chronos_jobs ) : #NEWLINE# #INDENT# mock_matching_jobs = [ { #NEWLINE# #INDENT# 'name' : 'service instance' , #NEWLINE# #UNINDENT# } ] #NEWLINE# mock_lookup_chronos_jobs . return_value = mock_matching_jobs #NEWLINE# mock_load_chronos_config . return_value = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# matching = chronos_tools . get_job_for_service_instance ( 'service' , 'instance' ) #NEWLINE# assert ( matching == mock_matching_jobs [ 0 ] )