mirror of
https://github.com/virt-manager/virt-manager.git
synced 2026-08-11 05:24:55 -05:00
devices: smartcard: Use CharSource
smartcard does the same internally for libvirt, so let's follow that pattern, and fix the fallout
This commit is contained in:
@@ -966,6 +966,8 @@ class XMLParseTest(unittest.TestCase):
|
||||
|
||||
dev1 = guest.devices.smartcard[0]
|
||||
dev2 = guest.devices.smartcard[1]
|
||||
dev3 = guest.devices.smartcard[2]
|
||||
dev4 = guest.devices.smartcard[3]
|
||||
|
||||
check = self._make_checker(dev1)
|
||||
check("type", None, "tcp")
|
||||
@@ -974,6 +976,16 @@ class XMLParseTest(unittest.TestCase):
|
||||
check("mode", "passthrough", "host")
|
||||
check("type", "spicevmc", None)
|
||||
|
||||
check = self._make_checker(dev3)
|
||||
check("type", "tcp")
|
||||
check("source.host", "127.0.0.1")
|
||||
check("source.service", 2001)
|
||||
|
||||
check = self._make_checker(dev4)
|
||||
check("type", "unix")
|
||||
check("source.path", "/tmp/smartcard.sock")
|
||||
check("source.mode", "bind")
|
||||
|
||||
self._alter_compare(guest.get_xml(), outfile)
|
||||
|
||||
def testAlterRedirdev(self):
|
||||
|
||||
Reference in New Issue
Block a user