#NEWLINE# @ mock . patch ( 'sahara.conductor.API.cluster_update' ) #NEWLINE# @ mock . patch ( 'sahara.context.ctx' ) #NEWLINE# @ mock . patch ( ( plugin_path + 'deploy.configure_cluster' ) ) #NEWLINE# @ mock . patch ( ( cloudera_utils_path + 'get_cloudera_manager_info' ) , return_value = { #NEWLINE# #INDENT# 'fake_cm_info' : 'fake' , #NEWLINE# #UNINDENT# } ) #NEWLINE# def test_config_cluster( self , get_cm_info , configure_cluster , ctx , cluster_update ) : #NEWLINE# #INDENT# cluster = mock . Mock ( ) #NEWLINE# self . vh . configure_cluster ( cluster ) #NEWLINE# configure_cluster . assert_called_once_with ( cluster ) #NEWLINE# cluster_update . assert_called_once_with ( ctx ( ) , cluster , { #NEWLINE# #INDENT# 'info' : { #NEWLINE# #INDENT# 'fake_cm_info' : 'fake' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } )