

@mock.patch('nova.objects.RequestSpec._populate_group_info')
def test_from_components_with_instance_group(self, mock_pgi):
    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(instance)
    filter_properties = {
        'fake': 'property',
    }
    instance_group = objects.InstanceGroup()
    objects.RequestSpec.from_components(ctxt, instance.uuid, image, flavor, instance.numa_topology, instance.pci_requests, filter_properties, instance_group, instance.availability_zone)
    self.assertFalse(mock_pgi.called)

dataset/ETHPy150Open openstack/nova/nova/tests/unit/objects/test_request_spec.py _TestRequestSpecObject.test_from_components_with_instance_group/VarMisuse@82/139 `ctxt`->`instance`