#NEWLINE# def test_load_chronos_job_config( self ) : #NEWLINE# #INDENT# fake_soa_dir = '/tmp/' #NEWLINE# with contextlib . nested ( mock . patch ( 'paasta_tools.chronos_tools.load_deployments_json' , autospec = True ) , mock . patch ( 'paasta_tools.chronos_tools.read_chronos_jobs_for_service' , autospec = True ) ) as ( mock_load_deployments_json , mock_read_chronos_jobs_for_service ) : #NEWLINE# #INDENT# mock_load_deployments_json . return_value . get_branch_dict . return_value = self . fake_branch_dict #NEWLINE# mock_read_chronos_jobs_for_service . return_value = self . fake_config_file #NEWLINE# actual = chronos_tools . load_chronos_job_config ( service = self . fake_service , instance = self . fake_job_name , cluster = self . fake_cluster , soa_dir = fake_soa_dir ) #NEWLINE# mock_load_deployments_json . assert_called_once_with ( self . fake_service , soa_dir = fake_soa_dir ) #NEWLINE# mock_read_chronos_jobs_for_service . assert_called_once_with ( self . fake_service , self . fake_cluster , soa_dir = fake_soa_dir ) #NEWLINE# assert ( actual == self . fake_chronos_job_config )