mirror of
https://gitlab.com/libvirt/libvirt-python.git
synced 2025-12-06 00:23:47 +03:00
To prevent regressions, especially with generated code, we need to have test coverage of more APIs. This starts off with coverage for object creation for all object types supported by the test driver currently. This exercises constructors which have been broken several times in the past. Related https://gitlab.com/libvirt/libvirt-python/-/issues/4 Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
19 lines
552 B
Python
19 lines
552 B
Python
import unittest
|
|
import libvirt
|
|
|
|
|
|
class TestLibvirtDomainCheckpoint(unittest.TestCase):
|
|
def setUp(self):
|
|
self.conn = libvirt.open("test:///default")
|
|
self.dom = self.conn.lookupByName("test")
|
|
|
|
def tearDown(self):
|
|
self.dom = None
|
|
self.conn = None
|
|
|
|
@unittest.skipUnless(hasattr(libvirt.virDomain, "checkpointCreateXML"),
|
|
"checkpoints not supported in this libvirt")
|
|
def testCheckpointCreate(self):
|
|
cp = self.dom.checkpointCreateXML("<domaincheckpoint/>")
|
|
cp.delete()
|