

def test_clone_error(self):
    'RuntimeError is raised if the base image is not contained within a libvirt Pool.'
    pool = mock.Mock()
    hypervisor = mock.Mock()
    hypervisor.storageVolLookupByPath.side_effect = libvirt.libvirtError('BOOM')
    with hypervisor.assertRaises(RuntimeError) as error:
        qemu.disk_clone(hypervisor, 'foo', pool, {
            'image': '/foo/bar/baz.qcow2',
            'clone': {
                
            },
        })
        self.assertEqual(str(error), '/foo/bar/baz.qcow2 disk must be contained in a libvirt storage pool.')

dataset/ETHPy150Open F-Secure/see/see/context/resources/test/qemu_test.py DiskCloneTest.test_clone_error/VarMisuse@42/85 `self`->`hypervisor`