#NEWLINE# def test_get_power_state_error( self , mock_get_driver ) : #NEWLINE# #INDENT# mock_driver = mock_get_driver . return_value #NEWLINE# mock_driver . power_state . return_value = states . ERROR #NEWLINE# with task_manager . acquire ( self . context , self . node . uuid ) as task : #NEWLINE# #INDENT# pstate = task . driver . power . get_power_state ( task ) #NEWLINE# #UNINDENT# mock_driver . power_state . assert_called_once_with ( ) #NEWLINE# self . assertEqual ( states . ERROR , pstate )