#NEWLINE# def test_cluster_with_ambari( self ) : #NEWLINE# #INDENT# cluster = make_cluster ( { #NEWLINE# #INDENT# 1 : [ p_common . AMBARI_SERVER , p_common . ZOOKEEPER_SERVER , p_common . NAMENODE , p_common . DATANODE , p_common . RESOURCEMANAGER , p_common . NODEMANAGER , p_common . HISTORYSERVER , p_common . APP_TIMELINE_SERVER ] , #NEWLINE# #UNINDENT# } ) #NEWLINE# cluster . cluster_configs = { #NEWLINE# #INDENT# 'general' : { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# with mock . patch ( 'sahara.plugins.ambari.validation.conductor' ) as p : #NEWLINE# #INDENT# p . cluster_get = mock . Mock ( ) #NEWLINE# p . cluster_get . return_value = cluster #NEWLINE# self . assertIsNone ( self . plugin . validate ( self ) )