def test_disk_xml_modifies(self):
        """XML without COW fields are modified if existing."""
        pool_config = """<pool><target><path>/poolpath</path></target></pool>"""
        disk_config = """<volume><target><path>/path/volume.qcow2</path></target><name>bar</name>""" +\
                      """<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></volume>"""
        results = qemu.disk_xml('foo', pool_config, disk_config, False)
        self.assertEqual(results, expected, compare(results, expected))
dataset/ETHPy150Open F-Secure/see/see/context/resources/test/qemu_test.py/DiskXMLTest.test_disk_xml_modifies/original