

def test_from_components(self):
    ctxt = context.RequestContext('fake-user', 'fake-project')
    instance = fake_instance.fake_instance_obj(ctxt)
    image = {
        'id': uuids.image_id,
        'properties': {
            'mappings': [],
        },
        'status': 'fake-status',
        'location': 'far-away',
    }
    flavor = fake_flavor.fake_flavor_obj(ctxt)
    filter_properties = {
        
    }
    instance_group = None
    spec = objects.RequestSpec.from_components(f, instance.uuid, image, flavor, instance.numa_topology, instance.pci_requests, filter_properties, instance_group, instance.availability_zone)
    for field in [f for f in spec.obj_fields if (f != 'id')]:
        self.assertEqual(True, spec.obj_attr_is_set(field), ('Field: %s is not set' % field))
    self.assertEqual(ctxt, spec._context)

dataset/ETHPy150Open openstack/nova/nova/tests/unit/objects/test_request_spec.py _TestRequestSpecObject.test_from_components/VarMisuse@94/137 `ctxt`->`f`