

def test_add_floating_ip_error(self, send_ip_addr_adv_notif):
    ri = self._create_router()
    ri._add_fip_addr_to_device = mock.Mock(return_value=False)
    result = ri.add_floating_ip({
        'floating_ip_address': '15.1.2.3',
    }, mock.sentinel.interface_name, mock.sentinel.device)
    self.assertFalse(ip_lib.send_ip_addr_adv_notif.called)
    self.assertEqual(l3_constants.FLOATINGIP_STATUS_ERROR, result)

dataset/ETHPy150Open openstack/neutron/neutron/tests/unit/agent/l3/test_legacy_router.py TestAddFloatingIpWithMockGarp.test_add_floating_ip_error/original