#NEWLINE# def test_get_cluster_attributes_by_components( self ) : #NEWLINE# #INDENT# release = self . env . create_release ( components_metadata = [ { #NEWLINE# #INDENT# 'name' : 'hypervisor:libvirt:test' , #NEWLINE# 'bind' : [ [ 'settings:common.libvirt_type.value' , 'test' ] , [ 'wrong_model:field.value' , 'smth' ] ] , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'name' : 'additional_service:new' , #NEWLINE# 'bind' : [ 'settings:additional_components.new.value' ] , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'name' : 'network:some_net' , #NEWLINE# 'bind' : [ [ 'cluster:net_provider' , 'test_provider' ] , 'settings:some_net.checkbox' ] , #NEWLINE# #UNINDENT# } ] ) #NEWLINE# selected_components = [ 'network:some_net' , 'hypervisor:libvirt:test' , 'additional_service:new_plugin_service' ] #NEWLINE# result_attrs = objects . Cluster . get_cluster_attributes_by_components ( selected_components , release . id ) #NEWLINE# self . assertDictEqual ( result_attrs , { #NEWLINE# #INDENT# 'editable' : { #NEWLINE# #INDENT# 'some_net' : { #NEWLINE# #INDENT# 'checkbox' : True , #NEWLINE# #UNINDENT# } , #NEWLINE# 'common' : { #NEWLINE# #INDENT# 'libvirt_type' : { #NEWLINE# #INDENT# 'value' : 'test' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# 'cluster' : { #NEWLINE# #INDENT# 'net_provider' : 'test_provider' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } )