Ejemplo n.º 1
0
    def test_findLiveSnapshotSupport(self):
        capsFile = self._readCaps("caps_libvirt_intel_i73770_nosnap.out")
        capsData = ET.fromstring(capsFile)

        guests = capsData.findall('guest')

        result = caps._findLiveSnapshotSupport(guests[0])
        self.assertIsNone(result)

        result = caps._findLiveSnapshotSupport(guests[1])
        self.assertFalse(result)

        capsFile = self._readCaps("caps_libvirt_intel_i73770.out")
        capsData = ET.fromstring(capsFile)

        guests = capsData.findall('guest')

        result = caps._findLiveSnapshotSupport(guests[0])
        self.assertIsNone(result)

        result = caps._findLiveSnapshotSupport(guests[1])
        self.assertTrue(result)
Ejemplo n.º 2
0
    def test_findLiveSnapshotSupport(self):
        capsFile = self._readCaps("caps_libvirt_intel_i73770_nosnap.out")
        capsData = ET.fromstring(capsFile)

        guests = capsData.findall('guest')

        result = caps._findLiveSnapshotSupport(guests[0])
        self.assertIsNone(result)

        result = caps._findLiveSnapshotSupport(guests[1])
        self.assertFalse(result)

        capsFile = self._readCaps("caps_libvirt_intel_i73770.out")
        capsData = ET.fromstring(capsFile)

        guests = capsData.findall('guest')

        result = caps._findLiveSnapshotSupport(guests[0])
        self.assertIsNone(result)

        result = caps._findLiveSnapshotSupport(guests[1])
        self.assertTrue(result)
Ejemplo n.º 3
0
 def test_findLiveSnapshotSupport_badData(self):
     # XML which completely does not fit the schema expected
     caps_string = "<a><b></b></a>"
     caps_data = ET.fromstring(caps_string)
     result = caps._findLiveSnapshotSupport(caps_data)
     self.assertIsNone(result)
Ejemplo n.º 4
0
 def test_findLiveSnapshotSupport_badData(self):
     # XML which completely does not fit the schema expected
     caps_string = "<a><b></b></a>"
     caps_data = ET.fromstring(caps_string)
     result = caps._findLiveSnapshotSupport(caps_data)
     self.assertIsNone(result)