

def test_disk_cow(self):
    'XML with COW.'
    pool_config = '<pool><target><path>/poolpath</path></target></pool>'
    disk_config = '<volume><target><path>/path/volume.qcow2</path></target><capacity>10</capacity></volume>'
    expected = (((('<volume type="file"><name>foo</name><uuid>foo</uuid><target>' + '<path>/poolpath/foo.qcow2</path><permissions><mode>0644</mode>') + '</permissions><format type="qcow2" />') + '</target><capacity>10</capacity><backingStore><path>/path/volume.qcow2</path>') + '<format type="qcow2" /></backingStore></volume>')
    results = qemu.disk_xml('foo', pool_config, disk_config, True)
    results = results.replace('\n', '').replace('\t', '').replace('  ', '')
    self.assertEqual(results, expected, compare(results, expected))

dataset/ETHPy150Open F-Secure/see/see/context/resources/test/qemu_test.py DiskXMLTest.test_disk_cow/original