def test__update_arp_entry_calls_arp_cache_with_no_device(self):
    (ri, subnet_id) = self._setup_test_for_arp_entry_cache()
    state = True
    with mock.patch('neutron.agent.linux.ip_lib.IPDevice') as rtrdev, mock.patch.object(ri, '_cache_arp_entry') as arp_cache:
        rtrdev.return_value.exists.return_value = False
        state = ri._update_arp_entry(mock.ANY, mock.ANY, subnet_id, 'add')
    self.assertFalse(state)
    self.assertTrue(arp_cache.called)
    arp_cache.assert_called_once_with(mock.ANY, mock.ANY, subnet_id, 'add')
    self.assertFalse(rtrdev.neigh.add.called)
def test__update_arp_entry_calls_arp_cache_with_no_device(self):
    (ri, subnet_id) = self._setup_test_for_arp_entry_cache()
    state = True
    with mock.patch('neutron.agent.linux.ip_lib.IPDevice') as rtrdev, mock.patch.object(ri, '_cache_arp_entry') as arp_cache:
        rtrdev.return_value.exists.return_value = False
        state = ri._update_arp_entry(mock.ANY, mock.ANY, subnet_id, 'add')
    self.assertFalse(state)
    self.assertTrue(arp_cache.called)
    arp_cache.assert_called_once_with(mock.ANY, mock.ANY, subnet_id, 'add')
    self.assertFalse(rtrdev.neigh.add.called)