

def test_build_instances(self):
    call_info = self._stub_rpc_method('cast', None)
    instances = [objects.Instance(id=1), objects.Instance(id=2)]
    self.cells_rpcapi.build_instances(self.fake_context, instances=instances, image={
        'fake': 'image',
    }, arg1=1, arg2=2, arg3=3)
    expected_args = {
        'build_inst_kwargs': {
            'instances': instances,
            'image': {
                'fake': 'image',
            },
            'arg1': 1,
            'arg2': 2,
            'arg3': 3,
        },
    }
    self._check_result(call_info, 'build_instances', expected_args, version='1.34')

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