def test_vgpu_placement(self, mdev_specs, mdev_placement, instances):
        with MonkeyPatchScope([
                (hostdev, '_each_mdev_device', lambda: self.devices)
        ]):
            for mdev_type, mdev_uuid in mdev_specs:
                hostdev.spawn_mdev(mdev_type, mdev_uuid, mdev_placement,
                                   self.log)
        for inst, dev in zip(instances, self.devices):
            dev_inst = []
            for mdev_type in dev.mdev_types:
                dev_inst.extend(mdev_type.instances)
            self.assertEqual(inst, dev_inst)