From c1a1ac58ba3eeaab60ef289ba6e9a3ee80f0aa2a Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Sun, 2 Dec 2018 09:03:01 +0000 Subject: [PATCH] Fix tests and code --- openlp/core/widgets/views.py | 2 +- tests/interfaces/openlp_core/lib/test_pluginmanager.py | 2 +- tests/openlp_core/projectors/test_projector_db.py | 3 --- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/openlp/core/widgets/views.py b/openlp/core/widgets/views.py index e04587185..0f719becb 100644 --- a/openlp/core/widgets/views.py +++ b/openlp/core/widgets/views.py @@ -194,7 +194,7 @@ class ListPreviewWidget(QtWidgets.QTableWidget, RegistryProperties): image = self.image_manager.get_image(frame['image'], ImageSource.CommandPlugins) pixmap = QtGui.QPixmap.fromImage(image) else: - pixmap = frame['image'].pixmap(80, 80) + pixmap = None # frame['image'].pixmap(80, 80) else: image = self.image_manager.get_image(frame['path'], ImageSource.ImagePlugin) pixmap = QtGui.QPixmap.fromImage(image) diff --git a/tests/interfaces/openlp_core/lib/test_pluginmanager.py b/tests/interfaces/openlp_core/lib/test_pluginmanager.py index 13478c21c..c72d30211 100644 --- a/tests/interfaces/openlp_core/lib/test_pluginmanager.py +++ b/tests/interfaces/openlp_core/lib/test_pluginmanager.py @@ -80,7 +80,7 @@ class TestPluginManager(TestCase, TestMixin): # WHEN: We mock out sys.platform to make it return "darwin" and then find the plugins old_platform = sys.platform sys.platform = 'darwin' - plugin_manager.find_plugins() + plugin_manager.initialise_plugins() sys.platform = old_platform # THEN: We should find the "Songs", "Bibles", etc in the plugins list diff --git a/tests/openlp_core/projectors/test_projector_db.py b/tests/openlp_core/projectors/test_projector_db.py index a1db28b6d..26aae945f 100644 --- a/tests/openlp_core/projectors/test_projector_db.py +++ b/tests/openlp_core/projectors/test_projector_db.py @@ -146,9 +146,6 @@ class TestProjectorDB(TestCase, TestMixin): Registry().set_flag('no_web_server', True) # Mock classes and methods used by mainwindow. with patch('openlp.core.ui.mainwindow.SettingsForm'), \ - patch('openlp.core.ui.mainwindow.ImageManager'), \ - patch('openlp.core.ui.mainwindow.LiveController'), \ - patch('openlp.core.ui.mainwindow.PreviewController'), \ patch('openlp.core.ui.mainwindow.OpenLPDockWidget'), \ patch('openlp.core.ui.mainwindow.QtWidgets.QToolBox'), \ patch('openlp.core.ui.mainwindow.QtWidgets.QMainWindow.addDockWidget'), \