'Tests that we ignore a libvirt error when the nw filter already
exists for a given name.'

def test_define_filter_already_exists(self):

    error = fakelibvirt.libvirtError('already    exists')
    error.err = (fakelibvirt.VIR_ERR_OPERATION_FAILED, None, "filter    'nova-no-nd-reflection'    already    exists    with    uuid    e740c5ec-c715-4f73-9874-630cc73d4ac2")
    with mock.patch.object(self.fw._conn, 'nwfilterDefineXML', side_effect=error) as define:
        self.fw._define_filter(mock.sentinel.xml)
    define.assert_called_once_with(mock.sentinel.xml)
