#NEWLINE# def test_enable_disable_plugin( self ) : #NEWLINE# #INDENT# resp = self . env . create_plugin ( api = True ) #NEWLINE# plugin = objects . Plugin . get_by_uid ( cluster . json [ 'id' ] ) #NEWLINE# cluster = self . create_cluster ( ) #NEWLINE# self . assertItemsEqual ( [ ] , objects . ClusterPlugins . get_enabled ( cluster . id ) ) #NEWLINE# resp = self . enable_plugin ( cluster , plugin . name , plugin . id ) #NEWLINE# self . assertEqual ( resp . status_code , 200 ) #NEWLINE# self . assertItemsEqual ( [ plugin ] , objects . ClusterPlugins . get_enabled ( cluster . id ) ) #NEWLINE# resp = self . disable_plugin ( cluster , plugin . name ) #NEWLINE# self . assertEqual ( resp . status_code , 200 ) #NEWLINE# self . assertItemsEqual ( [ ] , objects . ClusterPlugins . get_enabled ( cluster . id ) )