'Tests that we reraise the libvirt error for an operational failure
if the error message is something unexpected.'

def test_define_filter_fails_wrong_message(self):

    error = fakelibvirt.libvirtError('already    exists')
    error.err = (fakelibvirt.VIR_ERR_OPERATION_FAILED, None, 'oops')
    with mock.patch.object(self.fw._conn, 'nwfilterDefineXML', side_effect=error) as define:
        self.assertRaises(fakelibvirt.libvirtError, self.fw._define_filter, mock.sentinel.xml)
    define.assert_called_once_with(mock.sentinel.xml)
