'Create two servers with the same host and different
project_ids and check that the host_id\'s are unique.'

def test_unique_host_id(self):

    def return_instance_with_host(context, *args, **kwargs):
        project_id = uuidutils.generate_uuid()
        return fakes.stub_instance_obj(context, id=1, uuid=FAKE_UUID, project_id=project_id, host='fake_host')
    self.stubs.Set(compute_api.API, 'get', return_instance_with_host)
    req = self.req(('/fake/servers/%s' % FAKE_UUID))
    with mock.patch.object(compute_api.API, 'get') as mock_get:
        mock_get.side_effect = return_instance_with_host
        server1 = self.controller.show(req, FAKE_UUID)
        server2 = self.controller.show(req, FAKE_UUID)
    self.assertNotEqual(server1['server']['hostId'], server2['server']['hostId'])
