

def test_cast_compute_api_method(self):
    fake_cell_name = 'fake_cell_name'
    fake_method = 'fake_method'
    fake_method_args = (1, 2)
    fake_method_kwargs = {
        'kwarg1': 10,
        'kwarg2': 20,
    }
    expected_method_info = {
        'method': fake_method,
        'method_args': fake_method_args,
        'method_kwargs': fake_method_kwargs,
    }
    expected_args = {
        'method_info': expected_method_info,
        'cell_name': fake_cell_name,
        'call': False,
    }
    call_info = self._stub_rpc_method('cast', None)
    self.cells_rpcapi.cast_compute_api_method(self.fake_context, fake_cell_name, fake_method, *fake_method_args, **fake_method_kwargs)
    self._check_result(call_info, 'run_compute_api_method', expected_args)

dataset/ETHPy150Open openstack/nova/nova/tests/unit/cells/test_cells_rpcapi.py CellsAPITestCase.test_cast_compute_api_method/original