Fix incorrect Settings invocation in Qube Manager
fixes QubesOS/qubes-issues#5963
This commit is contained in:
parent
37271db3d8
commit
29ce349be0
@ -1046,7 +1046,8 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtWidgets.QMainWindow):
|
|||||||
try:
|
try:
|
||||||
with common_threads.busy_cursor():
|
with common_threads.busy_cursor():
|
||||||
settings_window = settings.VMSettingsWindow(
|
settings_window = settings.VMSettingsWindow(
|
||||||
vm, self.qt_app, tab)
|
vm, init_page=tab, qapp=self.qt_app,
|
||||||
|
qubesapp=self.qubes_app)
|
||||||
settings_window.exec_()
|
settings_window.exec_()
|
||||||
except exc.QubesException as ex:
|
except exc.QubesException as ex:
|
||||||
QtWidgets.QMessageBox.warning(
|
QtWidgets.QMessageBox.warning(
|
||||||
|
@ -274,7 +274,7 @@ class QubeManagerTest(unittest.TestCase):
|
|||||||
QtTest.QTest.mouseClick(widget,
|
QtTest.QTest.mouseClick(widget,
|
||||||
QtCore.Qt.LeftButton)
|
QtCore.Qt.LeftButton)
|
||||||
mock_window.assert_called_once_with(
|
mock_window.assert_called_once_with(
|
||||||
selected_vm, self.qtapp, "basic")
|
selected_vm, qapp=self.qtapp, init_page="basic", qubesapp=self.qapp)
|
||||||
|
|
||||||
def test_201_vm_open_settings_admin(self):
|
def test_201_vm_open_settings_admin(self):
|
||||||
self._select_admin_vm()
|
self._select_admin_vm()
|
||||||
@ -295,7 +295,8 @@ class QubeManagerTest(unittest.TestCase):
|
|||||||
QtTest.QTest.mouseClick(widget,
|
QtTest.QTest.mouseClick(widget,
|
||||||
QtCore.Qt.LeftButton)
|
QtCore.Qt.LeftButton)
|
||||||
mock_window.assert_called_once_with(
|
mock_window.assert_called_once_with(
|
||||||
selected_vm, self.qtapp, "firewall")
|
selected_vm, qapp=self.qtapp, init_page="firewall",
|
||||||
|
qubesapp=self.qapp)
|
||||||
|
|
||||||
@unittest.mock.patch('qubesmanager.settings.VMSettingsWindow')
|
@unittest.mock.patch('qubesmanager.settings.VMSettingsWindow')
|
||||||
def test_203_vm_open_apps(self, mock_window):
|
def test_203_vm_open_apps(self, mock_window):
|
||||||
@ -306,7 +307,8 @@ class QubeManagerTest(unittest.TestCase):
|
|||||||
QtTest.QTest.mouseClick(widget,
|
QtTest.QTest.mouseClick(widget,
|
||||||
QtCore.Qt.LeftButton)
|
QtCore.Qt.LeftButton)
|
||||||
mock_window.assert_called_once_with(
|
mock_window.assert_called_once_with(
|
||||||
selected_vm, self.qtapp, "applications")
|
selected_vm, qapp=self.qtapp, init_page="applications",
|
||||||
|
qubesapp=self.qapp)
|
||||||
|
|
||||||
def test_204_vm_keyboard(self):
|
def test_204_vm_keyboard(self):
|
||||||
selected_vm = self._select_non_admin_vm(running=True)
|
selected_vm = self._select_non_admin_vm(running=True)
|
||||||
@ -799,7 +801,8 @@ class QubeManagerTest(unittest.TestCase):
|
|||||||
as mock_settings:
|
as mock_settings:
|
||||||
self.dialog.action_settings.trigger()
|
self.dialog.action_settings.trigger()
|
||||||
mock_settings.assert_called_once_with(
|
mock_settings.assert_called_once_with(
|
||||||
self.qapp.domains["test-vm"], self.qtapp, "basic")
|
self.qapp.domains["test-vm"], qapp = self.qtapp,
|
||||||
|
init_page = "basic", qubesapp = self.qapp)
|
||||||
|
|
||||||
def test_401_event_domain_removed(self):
|
def test_401_event_domain_removed(self):
|
||||||
initial_vms = self._create_set_of_current_vms()
|
initial_vms = self._create_set_of_current_vms()
|
||||||
|
Loading…
Reference in New Issue
Block a user