forked from openlp/openlp
Mock out AudioPlayer to avoid loading Phonon during test.
This commit is contained in:
parent
1efc145cdf
commit
76b47019b6
|
@ -39,7 +39,7 @@ from openlp.core.ui import MainDisplay
|
||||||
from openlp.core.ui.maindisplay import TRANSPARENT_STYLESHEET, OPAQUE_STYLESHEET
|
from openlp.core.ui.maindisplay import TRANSPARENT_STYLESHEET, OPAQUE_STYLESHEET
|
||||||
|
|
||||||
from tests.helpers.testmixin import TestMixin
|
from tests.helpers.testmixin import TestMixin
|
||||||
from tests.functional import MagicMock
|
from tests.functional import MagicMock, patch
|
||||||
|
|
||||||
SCREEN = {
|
SCREEN = {
|
||||||
'primary': False,
|
'primary': False,
|
||||||
|
@ -64,11 +64,14 @@ class TestMainDisplay(TestCase, TestMixin):
|
||||||
self.registry = Registry()
|
self.registry = Registry()
|
||||||
self.setup_application()
|
self.setup_application()
|
||||||
Registry().register('application', self.app)
|
Registry().register('application', self.app)
|
||||||
|
self.mocked_audio_player = patch('openlp.core.ui.maindisplay.AudioPlayer')
|
||||||
|
self.mocked_audio_player.start()
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
"""
|
"""
|
||||||
Delete QApplication.
|
Delete QApplication.
|
||||||
"""
|
"""
|
||||||
|
self.mocked_audio_player.stop()
|
||||||
del self.screens
|
del self.screens
|
||||||
|
|
||||||
def initial_main_display_test(self):
|
def initial_main_display_test(self):
|
||||||
|
|
Loading…
Reference in New Issue