'Tests that we can lookup a compute node in the HostAPI using a uuid
and will fail with ComputeHostNotFound if we didn\'t find it in any
cell.'

@mock.patch.object(objects.CellMappingList, 'get_all', return_value=objects.CellMappingList(objects=[objects.CellMapping(uuid=objects.CellMapping.CELL0_UUID, transport_url='mq://cell0', database_connection='db://cell0'), objects.CellMapping(uuid=uuids.cell1_uuid, transport_url='mq://fake1', database_connection='db://fake1'), objects.CellMapping(uuid=uuids.cell2_uuid, transport_url='mq://fake2', database_connection='db://fake2')]))
@mock.patch.object(objects.ComputeNode, 'get_by_uuid', side_effect=exception.ComputeHostNotFound(host=uuids.cn_uuid))
def test_compute_node_get_not_found(self, compute_get_by_uuid, cell_mappings_get_all):

    self.assertRaises(exception.ComputeHostNotFound, self.host_api.compute_node_get, self.ctxt, uuids.cn_uuid)
    self.assertEqual(2, compute_get_by_uuid.call_count)
    compute_get_by_uuid.assert_has_calls(([mock.call(self.ctxt, uuids.cn_uuid)] * 2))
