forked from openlp/openlp
Fixed test on windows by mocking out render.
This commit is contained in:
parent
9966d8ace7
commit
7cb8758fdd
@ -23,7 +23,7 @@
|
|||||||
Interface tests to test the ThemeWizard class and related methods.
|
Interface tests to test the ThemeWizard class and related methods.
|
||||||
"""
|
"""
|
||||||
from unittest import TestCase
|
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.common.registry import Registry
|
||||||
from openlp.core.ui.themeform import ThemeForm
|
from openlp.core.ui.themeform import ThemeForm
|
||||||
@ -39,6 +39,8 @@ class TestThemeManager(TestCase, TestMixin):
|
|||||||
Create the UI
|
Create the UI
|
||||||
"""
|
"""
|
||||||
Registry.create()
|
Registry.create()
|
||||||
|
mocked_renderer = MagicMock()
|
||||||
|
Registry().register('renderer', mocked_renderer)
|
||||||
|
|
||||||
@patch('openlp.core.display.window.QtWidgets.QVBoxLayout')
|
@patch('openlp.core.display.window.QtWidgets.QVBoxLayout')
|
||||||
def test_create_theme_wizard(self, mocked_qvboxlayout):
|
def test_create_theme_wizard(self, mocked_qvboxlayout):
|
||||||
|
Loading…
Reference in New Issue
Block a user