

def test_from_limits(self):
    limits_dict = {
        'numa_topology': None,
        'vcpu': 1.0,
        'disk_gb': 1.0,
        'memory_mb': 1.0,
    }
    spec = objects.RequestSpec()
    spec._from_limits(limits_dict)
    self.assertIsInstance(spec.limits, objects.SchedulerLimits)
    self.assertIsNone(self.limits.numa_topology)
    self.assertEqual(1, spec.limits.vcpu)
    self.assertEqual(1, spec.limits.disk_gb)
    self.assertEqual(1, spec.limits.memory_mb)

dataset/ETHPy150Open openstack/nova/nova/tests/unit/objects/test_request_spec.py _TestRequestSpecObject.test_from_limits/VarMisuse@68/102 `spec`->`self`