

def test_instance_update_at_top(self):
    fake_info_cache = objects.InstanceInfoCache(instance_uuid=uuids.instance)
    fake_sys_metadata = {
        'key1': 'value1',
        'key2': 'value2',
    }
    fake_attrs = {
        'id': 2,
        'cell_name': 'fake',
        'metadata': {
            'fake': 'fake',
        },
        'info_cache': fake_info_cache,
        'system_metadata': fake_sys_metadata,
    }
    fake_instance = objects.Instance(**fake_attrs)
    call_info = self._stub_rpc_method('cast', None)
    self.cells_rpcapi.instance_update_at_top(self.fake_context, fake_instance)
    expected_args = {
        'instance': fake_instance,
    }
    self._check_result(call_info, 'instance_update_at_top', expected_args, version='1.35')

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