mirror of
https://gitlab.com/libvirt/libvirt-python.git
synced 2025-08-02 04:21:59 +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>
17 lines
398 B
Python
17 lines
398 B
Python
import unittest
|
|
import libvirt
|
|
|
|
|
|
class TestLibvirtDomainSnapshot(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
|
|
|
|
def testSnapCreate(self):
|
|
snap = self.dom.snapshotCreateXML("<domainsnapshot/>")
|
|
snap.delete()
|