def test_52_set_default_kernel_to_none2(self):
        self.app.default_kernel = None
        self.dialog = global_settings.GlobalSettingsWindow(
            self.qtapp, self.qapp)

        self.assertEqual(self.dialog.default_kernel_combo.currentText(),
                         "(none) (current)")
    def test_22_set_clock_vm_to_none2(self):
        self.app.clockvm = None
        self.dialog = global_settings.GlobalSettingsWindow(
            self.qtapp, self.qapp)

        self.assertEqual(self.dialog.clock_vm_combo.currentText(),
                         "(none) (current)")
Example #3
0
    def setUp(self):
        super(GlobalSettingsTest, self).setUp()
        self.qtapp, self.loop = init_qtapp()

        self.qapp = Qubes()
        self.dialog = global_settings.GlobalSettingsWindow(
            self.qtapp, self.qapp)

        self.setattr_patcher = unittest.mock.patch.object(
            type(self.dialog.qubes_app), "__setattr__")
        self.setattr_mock = self.setattr_patcher.start()
        self.addCleanup(self.setattr_patcher.stop)
    def setUp(self):
        super(GlobalSettingsTest, self).setUp()

        self.qapp = Qubes()
        self.qtapp = QtGui.QApplication(["test", "-style", "cleanlooks"])
        self.loop = quamash.QEventLoop(self.qtapp)
        self.dialog = global_settings.GlobalSettingsWindow(self.qtapp,
                                                           self.qapp)

        self.setattr_patcher = unittest.mock.patch.object(
            type(self.dialog.qvm_collection), "__setattr__")
        self.setattr_mock = self.setattr_patcher.start()
        self.addCleanup(self.setattr_patcher.stop)
Example #5
0
    def test_90_test_all_set_none(self, mock_qubes):
        mock_qubes.configure_mock()
        self.dialog = global_settings.GlobalSettingsWindow(
            self.qtapp, self.qapp)

        self.assertEqual(self.dialog.update_vm_combo.currentText(),
                         "(none) (current)",
                         "UpdateVM displays as none incorrectly")
        self.assertEqual(self.dialog.clock_vm_combo.currentText(),
                         "(none) (current)",
                         "ClockVM displays as none incorrectly")
        self.assertEqual(self.dialog.default_netvm_combo.currentText(),
                         "(none) (current)",
                         "Default NetVM displays as none incorrectly")
        self.assertEqual(self.dialog.default_template_combo.currentText(),
                         "(none) (current)",
                         "Default template displays as none incorrectly")
        self.assertEqual(self.dialog.default_kernel_combo.currentText(),
                         "(none) (current)",
                         "Defautl kernel displays as none incorrectly")
        self.assertEqual(self.dialog.default_dispvm_combo.currentText(),
                         "(none) (current)",
                         "Default DispVM displays as none incorrectly")
 def setUpInExecutor(self):
     self.qapp = Qubes()
     self.dialog = global_settings.GlobalSettingsWindow(
         self.qtapp, self.qapp)