

def test_to_legacy_filter_properties_dict(self):
    fake_numa_limits = objects.NUMATopologyLimits()
    fake_computes_obj = objects.ComputeNodeList(objects=[objects.ComputeNode(host='fake1', hypervisor_hostname='node1')])
    spec = objects.RequestSpec(ignore_hosts=['ignoredhost'], force_hosts=['fakehost'], force_nodes=['fakenode'], retry=objects.SchedulerRetries(num_attempts=1, hosts=fake_computes_obj), limits=objects.SchedulerLimits(numa_topology=fake_numa_limits, vcpu=1.0, disk_gb=10.0, memory_mb=8192.0), instance_group=objects.InstanceGroup(hosts=['fake1'], policies=['affinity']), scheduler_hints={
        'foo': ['bar'],
    })
    expected = {
        'ignore_hosts': ['ignoredhost'],
        'force_hosts': ['fakehost'],
        'force_nodes': ['fakenode'],
        'retry': {
            'num_attempts': 1,
            'hosts': [['fake1', 'node1']],
        },
        'limits': {
            'numa_topology': expected,
            'vcpu': 1.0,
            'disk_gb': 10.0,
            'memory_mb': 8192.0,
        },
        'group_updated': True,
        'group_hosts': set(['fake1']),
        'group_policies': set(['affinity']),
        'scheduler_hints': {
            'foo': 'bar',
        },
    }
    self.assertEqual(expected, spec.to_legacy_filter_properties_dict())

dataset/ETHPy150Open openstack/nova/nova/tests/unit/objects/test_request_spec.py _TestRequestSpecObject.test_to_legacy_filter_properties_dict/VarMisuse@191/310 `fake_numa_limits`->`expected`