diff --git a/qubesadmin/tests/devices.py b/qubesadmin/tests/devices.py index 9cb9a2a1..5c7ada06 100644 --- a/qubesadmin/tests/devices.py +++ b/qubesadmin/tests/devices.py @@ -47,7 +47,7 @@ def test_000_available(self): self.assertEqual(dev.backend_domain, self.vm) self.assertEqual(dev.ident, 'dev1') self.assertEqual( - dev.description, 'unknown test device (unknown vendor)') + dev.description, '?******: unknown vendor unknown test device') self.assertEqual(dev.data, {}) self.assertEqual(str(dev), 'test-vm:dev1') self.assertAllCalled() @@ -62,7 +62,7 @@ def test_001_available_desc(self): self.assertIsInstance(dev, qubesadmin.device_protocol.DeviceInfo) self.assertEqual(dev.backend_domain, self.vm) self.assertEqual(dev.ident, 'dev1') - self.assertEqual(dev.description, 'test-device (itl)') + self.assertEqual(dev.description, '?******: itl test-device') self.assertEqual(dev.data, {}) self.assertEqual(str(dev), 'test-vm:dev1') @@ -76,7 +76,7 @@ def test_002_available_options(self): self.assertIsInstance(dev, qubesadmin.device_protocol.DeviceInfo) self.assertEqual(dev.backend_domain, self.vm) self.assertEqual(dev.ident, 'dev1') - self.assertEqual(dev.description, 'test-device (itl)') + self.assertEqual(dev.description, '?******: itl test-device') self.assertEqual(dev.data, {'ro': 'True', 'other': '123'}) self.assertEqual(str(dev), 'test-vm:dev1') self.assertAllCalled() @@ -89,7 +89,7 @@ def test_010_getitem(self): self.assertIsInstance(dev, qubesadmin.device_protocol.DeviceInfo) self.assertEqual(dev.backend_domain, self.vm) self.assertEqual(dev.ident, 'dev1') - self.assertEqual(dev.description, 'test-device (itl)') + self.assertEqual(dev.description, '?******: itl test-device') self.assertEqual(dev.data, {}) self.assertEqual(str(dev), 'test-vm:dev1') self.assertAllCalled() @@ -103,7 +103,7 @@ def test_011_getitem_missing(self): self.assertEqual(dev.backend_domain, self.vm) self.assertEqual(dev.ident, 'dev2') self.assertEqual(dev.description, - 'unknown test device (unknown vendor)') + '?******: unknown vendor unknown test device') self.assertEqual(dev.data, {}) self.assertEqual(str(dev), 'test-vm:dev2') self.assertAllCalled() diff --git a/qubesadmin/tests/tools/qvm_device.py b/qubesadmin/tests/tools/qvm_device.py index 4cdcde26..5a5023b8 100644 --- a/qubesadmin/tests/tools/qvm_device.py +++ b/qubesadmin/tests/tools/qvm_device.py @@ -75,8 +75,8 @@ def test_000_list_all(self): ['testclass', 'list'], app=self.app) self.assertEqual( [x.rstrip() for x in buf.getvalue().splitlines()], - ['test-vm1:dev1 test-device (itl)', - 'test-vm2:dev2 test-device (? `)'] + ['test-vm1:dev1 ?******: itl test-device', + 'test-vm2:dev2 ?******: ? ` test-device'] ) def test_001_list_assigned_required(self): @@ -105,7 +105,7 @@ def test_001_list_assigned_required(self): ['testclass', 'list', 'test-vm3'], app=self.app) self.assertEqual( buf.getvalue(), - 'test-vm1:dev1 test-device (itl) test-vm3\n' + 'test-vm1:dev1 ?******: itl test-device test-vm3\n' ) def test_002_list_attach(self): @@ -134,7 +134,7 @@ def test_002_list_attach(self): ['testclass', 'list', 'test-vm3'], app=self.app) self.assertEqual( buf.getvalue(), - 'test-vm1:dev1 test-device (itl) test-vm3\n' + 'test-vm1:dev1 ?******: itl test-device test-vm3\n' ) def test_003_list_device_classes(self):