mirror of
https://gitlab.com/libvirt/libvirt-python.git
synced 2024-10-26 07:55:06 +03:00
1f44167510
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>
16 lines
380 B
Python
16 lines
380 B
Python
import unittest
|
|
import libvirt
|
|
|
|
|
|
class TestLibvirtNodeDev(unittest.TestCase):
|
|
def setUp(self):
|
|
self.conn = libvirt.open("test:///default")
|
|
self.nodedev = self.conn.nodeDeviceLookupByName("computer")
|
|
|
|
def tearDown(self):
|
|
self.nodedev = None
|
|
self.conn = None
|
|
|
|
def testAttr(self):
|
|
self.assertEqual(self.nodedev.name(), "computer")
|