def _mock_rpc_call(self, method, **kwargs):
        if 'host_param' in kwargs:
            kwargs.pop('host_param')
        else:
            kwargs.pop('host')
        rpc_message = {
            'method': method,
            'namespace': None,
            'args': kwargs,
            'version': self.host_api.rpcapi.client.target.version,
        }
        cells_rpcapi = self.host_api.rpcapi.client.cells_rpcapi
        self.mox.StubOutWithMock(cells_rpcapi, 'proxy_rpc_to_manager')
        cells_rpcapi.proxy_rpc_to_manager(self.ctxt,
                                          rpc_message,
                                          'compute.fake_host',
                                          call=True).AndReturn('fake-result')
dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/tests/unit/compute/test_host_api.py/ComputeHostAPICellsTestCase._mock_rpc_call/original