#NEWLINE# def test_list_job_names( self ) : #NEWLINE# #INDENT# fake_name = 'vegetables' #NEWLINE# fake_job_1 = 'carrot' #NEWLINE# fake_job_2 = 'celery' #NEWLINE# fake_cluster = 'broccoli' #NEWLINE# fake_dir = '/nail/home/veggies' #NEWLINE# fake_job_config = { #NEWLINE# #INDENT# fake_job_1 : self . fake_config_dict , #NEWLINE# fake_job_2 : self . fake_config_dict , #NEWLINE# #UNINDENT# } #NEWLINE# expected = [ ( fake_name , fake_job_1 ) , ( fake_name , fake_job_2 ) ] #NEWLINE# with mock . patch ( 'service_configuration_lib.read_extra_service_information' , autospec = True , return_value = fake_job_config ) as read_extra_info_patch : #NEWLINE# #INDENT# actual = chronos_tools . list_job_names ( fake_name , expected , fake_dir ) #NEWLINE# read_extra_info_patch . assert_called_once_with ( fake_name , 'chronos-broccoli' , soa_dir = fake_dir ) #NEWLINE# assert ( sorted ( expected ) == sorted ( actual ) )