#NEWLINE# def test_power_state_snmp_failure( self , mock_get_client ) : #NEWLINE# #INDENT# mock_client = mock_get_client . return_value #NEWLINE# driver = snmp . _get_driver ( self . node ) #NEWLINE# mock_client . get . side_effect = self . _get_snmp_failure ( ) #NEWLINE# self . assertRaises ( exception . SNMPFailure , driver . power_state ) #NEWLINE# mock_client . get . assert_called_once_with ( driver . _snmp_oid ( ) )