#NEWLINE# @ mock . patch ( 'sahara.plugins.vanilla.utils.get_resourcemanager' ) #NEWLINE# def test_nodemanagers_status( self , rm ) : #NEWLINE# #INDENT# report = files . get_file_text ( 'tests/unit/plugins/vanilla/hadoop2/resources/yarn-report.txt' ) #NEWLINE# rm . return_value = self . _get_instance ( report ) #NEWLINE# statuses = u . get_nodemanagers_status ( None ) #NEWLINE# expected = { #NEWLINE# #INDENT# 'cluster-worker-001.novalocal' : 'running' , #NEWLINE# 'cluster-worker-002.novalocal' : 'running' , #NEWLINE# 'cluster-worker-003.novalocal' : 'running' , #NEWLINE# 'cluster-worker-004.novalocal' : 'decommissioned' , #NEWLINE# #UNINDENT# } #NEWLINE# self . assertEqual ( expected , statuses )