tests: kde_args are passed with property of launcher

This commit is contained in:
Frédéric Pierret (fepitre) 2020-06-26 12:05:18 +02:00
parent e23c85e938
commit 6295b0ba2f
No known key found for this signature in database
GPG Key ID: 484010B5CDC576E2

View File

@ -53,6 +53,7 @@ class TC_00_qvm_start_gui(qubesadmin.tests.QubesTestCase):
]
args = self.launcher.kde_guid_args(self.app.domains['test-vm'])
self.launcher.kde = True
self.assertEqual(args, ['-T', '-p',
'_KDE_NET_WM_COLOR_SCHEME=s:' +
os.path.expanduser(
@ -60,19 +61,6 @@ class TC_00_qvm_start_gui(qubesadmin.tests.QubesTestCase):
self.assertAllCalled()
@unittest.mock.patch('subprocess.check_output')
def test_001_kde_args_none(self, proc_mock):
self.app.expected_calls[
('dom0', 'admin.vm.List', None, None)] = \
b'0\x00test-vm class=AppVM state=Running\n'
proc_mock.side_effect = [b'']
args = self.launcher.kde_guid_args(self.app.domains['test-vm'])
self.assertEqual(args, [])
self.assertAllCalled()
def test_010_common_args(self):
self.app.expected_calls[
('dom0', 'admin.vm.List', None, None)] = \