Merge remote-tracking branch 'origin/pr/245'

* origin/pr/245:
  Fix incorrect Settings invocation in Qube Manager
This commit is contained in:
Marek Marczykowski-Górecki 2020-07-30 03:28:26 +02:00
commit 6efb073c8b
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
2 changed files with 9 additions and 5 deletions

View File

@ -1213,7 +1213,8 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, 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.show() settings_window.show()
self.settings_windows[vm.name] = settings_window self.settings_windows[vm.name] = settings_window
except exc.QubesException as ex: except exc.QubesException as ex:

View File

@ -273,7 +273,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()
@ -294,7 +294,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):
@ -305,7 +306,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)
@ -798,7 +800,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()