From dd8503e435a01dfebae276700cec15fa6ab97840 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Tue, 11 Dec 2018 21:11:52 +0000 Subject: [PATCH] Fix tests --- tests/functional/openlp_core/ui/test_mainwindow.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/functional/openlp_core/ui/test_mainwindow.py b/tests/functional/openlp_core/ui/test_mainwindow.py index 1951f6a04..7927efacf 100644 --- a/tests/functional/openlp_core/ui/test_mainwindow.py +++ b/tests/functional/openlp_core/ui/test_mainwindow.py @@ -27,7 +27,7 @@ from pathlib import Path from unittest import TestCase from unittest.mock import MagicMock, patch -from PyQt5 import QtCore, QtWidgets +from PyQt5 import QtGui, QtCore, QtWidgets from openlp.core.state import State from openlp.core.common.i18n import UiStrings @@ -72,6 +72,7 @@ class TestMainWindow(TestCase, TestMixin): self.mocked_add_toolbar_action.side_effect = self._create_mock_action mocked_plugin = MagicMock() mocked_plugin.status = PluginStatus.Active + mocked_plugin.icon = QtGui.QIcon() Registry().register('mock_plugin', mocked_plugin) State().add_service("mock", 1, is_plugin=True, status=PluginStatus.Active) with patch('openlp.core.display.screens.ScreenList.__instance__', spec=ScreenList) as mocked_screen_list: