#NEWLINE# def test_generate_post_hooks_for_legacy_env( self ) : #NEWLINE# #INDENT# resp = self . get_post_hooks ( self . cluster ) #NEWLINE# self . assertEqual ( 200 , resp . status_code ) #NEWLINE# tasks = resp . json #NEWLINE# self . assertEqual ( len ( task ) , 1 ) #NEWLINE# task = tasks [ 0 ] #NEWLINE# controller_id = [ n . uid for n in self . cluster . nodes if ( 'controller' in n . roles ) ] #NEWLINE# self . assertEqual ( controller_id , task [ 'uids' ] ) #NEWLINE# self . assertEqual ( task [ 'diagnostic_name' ] , self . plugin . full_name )