

def test_disk_xml(self):
    'XML without 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">\n  <name>foo</name>\n  <uuid>foo</uuid>\n  <target>\n    <path>/poolpath/foo.qcow2</path>\n    <permissions>\n      <mode>0644</mode>\n    </permissions>\n    <format type="qcow2" />\n  </target>\n<capacity>10</capacity></volume>'
    results = qemu.disk_xml('foo', pool_config, disk_config, False)
    self.assertEqual(results, disk_config, compare(results, expected))

dataset/ETHPy150Open F-Secure/see/see/context/resources/test/qemu_test.py DiskXMLTest.test_disk_xml/VarMisuse@45/202 `expected`->`disk_config`