#NEWLINE# def test_set_power_state_bad_state( self ) : #NEWLINE# #INDENT# self . get_server_mock = self . get_server_patcher . start ( ) #NEWLINE# self . get_server_mock . return_value = self . Server ( ) #NEWLINE# with task_manager . acquire ( self . context , self . info [ 'uuid' ] , shared = False ) as task : #NEWLINE# #INDENT# self . assertRaises ( exception . IronicException , task . driver . power . set_power_state , self , 'BAD_PSTATE' ) #NEWLINE# #UNINDENT# self . get_server_patcher . stop ( )