From 7cb8758fdd4bd670408b36e563cbe7eb56b9a129 Mon Sep 17 00:00:00 2001 From: Tomas Groth Date: Tue, 11 Jun 2019 21:12:33 +0200 Subject: [PATCH] Fixed test on windows by mocking out render. --- tests/openlp_core/ui/test_themeform.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/openlp_core/ui/test_themeform.py b/tests/openlp_core/ui/test_themeform.py index 02a7d0589..19a86457f 100644 --- a/tests/openlp_core/ui/test_themeform.py +++ b/tests/openlp_core/ui/test_themeform.py @@ -23,7 +23,7 @@ Interface tests to test the ThemeWizard class and related methods. """ from unittest import TestCase -from unittest.mock import patch +from unittest.mock import patch, MagicMock from openlp.core.common.registry import Registry from openlp.core.ui.themeform import ThemeForm @@ -39,6 +39,8 @@ class TestThemeManager(TestCase, TestMixin): Create the UI """ Registry.create() + mocked_renderer = MagicMock() + Registry().register('renderer', mocked_renderer) @patch('openlp.core.display.window.QtWidgets.QVBoxLayout') def test_create_theme_wizard(self, mocked_qvboxlayout):