'Confirm evacuate scenario updates host and node.'

def test_rebuild_on_host_updated_target(self):

    def fake_get_compute_info(context, host):
        self.assertTrue(context.is_admin)
        self.assertEqual('fake-mini', host)
        cn = objects.ComputeNode(hypervisor_hostname=NODENAME)
        return cn
    with test.nested(mock.patch.object(self.compute.driver, 'instance_on_disk', side_effect=(lambda x: True)), mock.patch.object(self.compute, '_get_compute_info', side_effect=fake_get_compute_info)) as (mock_inst, mock_get):
        self._rebuild()
        instance = db.instance_get(self.context, self.inst.id)
        self.assertEqual(instance['host'], self.compute.host)
        self.assertEqual(NODENAME, instance['node'])
        self.assertTrue(mock_inst.called)
        self.assertTrue(mock_get.called)
