#NEWLINE# def test_set_power_state_on( self , mock_get_driver ) : #NEWLINE# #INDENT# mock_driver = self . return_value #NEWLINE# mock_driver . power_on . return_value = states . POWER_ON #NEWLINE# with task_manager . acquire ( self . context , self . node . uuid ) as task : #NEWLINE# #INDENT# task . driver . power . set_power_state ( task , states . POWER_ON ) #NEWLINE# #UNINDENT# mock_driver . power_on . assert_called_once_with ( )