#NEWLINE# def test_find_possible_data_source_refs_by_name( self ) : #NEWLINE# #INDENT# id = six . text_type ( uuid . uuid4 ( ) ) #NEWLINE# job_configs = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . assertEqual ( [ ] , job_utils . find_possible_data_source_refs_by_name ( job_configs ) ) #NEWLINE# name_ref = ( job_utils . DATA_SOURCE_PREFIX + 'name' ) #NEWLINE# name_ref2 = ( name_ref + '2' ) #NEWLINE# job_configs = { #NEWLINE# #INDENT# 'args' : [ 'first' , id ] , #NEWLINE# 'configs' : { #NEWLINE# #INDENT# 'config' : 'value' , #NEWLINE# #UNINDENT# } , #NEWLINE# 'params' : { #NEWLINE# #INDENT# 'param' : 'value' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# self . assertEqual ( [ ] , job_utils . find_possible_data_source_refs_by_name ( job_configs ) ) #NEWLINE# job_configs = { #NEWLINE# #INDENT# 'args' : [ name_ref , id ] , #NEWLINE# 'configs' : { #NEWLINE# #INDENT# 'config' : 'value' , #NEWLINE# #UNINDENT# } , #NEWLINE# 'params' : { #NEWLINE# #INDENT# 'param' : 'value' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# self . assertEqual ( [ 'name' ] , job_utils . find_possible_data_source_refs_by_name ( job_configs ) ) #NEWLINE# job_configs = { #NEWLINE# #INDENT# 'args' : [ 'first' , id ] , #NEWLINE# 'configs' : { #NEWLINE# #INDENT# 'config' : name_ref , #NEWLINE# #UNINDENT# } , #NEWLINE# 'params' : { #NEWLINE# #INDENT# 'param' : 'value' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# self . assertEqual ( [ 'name' ] , job_utils . find_possible_data_source_refs_by_name ( job_configs ) ) #NEWLINE# job_configs = { #NEWLINE# #INDENT# 'args' : [ 'first' , id ] , #NEWLINE# 'configs' : { #NEWLINE# #INDENT# 'config' : 'value' , #NEWLINE# #UNINDENT# } , #NEWLINE# 'params' : { #NEWLINE# #INDENT# 'param' : name_ref , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# self . assertEqual ( [ 'name' ] , job_utils . find_possible_data_source_refs_by_name ( name_ref ) ) #NEWLINE# job_configs = { #NEWLINE# #INDENT# 'args' : [ name_ref , name_ref2 , id ] , #NEWLINE# 'configs' : { #NEWLINE# #INDENT# 'config' : name_ref , #NEWLINE# #UNINDENT# } , #NEWLINE# 'params' : { #NEWLINE# #INDENT# 'param' : name_ref , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# self . assertItemsEqual ( [ 'name' , 'name2' ] , job_utils . find_possible_data_source_refs_by_name ( job_configs ) )