def test_volume_deletion(self):
        pool = mock.MagicMock()
        logger = mock.Mock()
        volumes = {'foo': mock.Mock(), 'bar': mock.Mock(), 'baz': mock.Mock()}
        pool.XMLDesc.return_value = """<pool><path>/foo/bar</path></pool>"""
        pool.listVolumes.return_value = ('foo', 'bar', 'baz')
        pool.storageVolLookupByName.side_effect = lambda n: volumes[n]
        qemu.pool_delete(pool, logger)
        volumes['foo'].delete.assert_called_with(0)
        volumes['bar'].delete.assert_called_with(0)
        volumes['baz'].delete.assert_called_with(0)
If volumes are contained within the Pool they are deleted.
dataset/ETHPy150Open F-Secure/see/see/context/resources/test/qemu_test.py/PoolDeleteTest.test_volume_deletion