From 49a074b95e8927c125839d4b0064309482ad868a Mon Sep 17 00:00:00 2001 From: Jonathan Springer Date: Mon, 29 May 2017 13:31:56 -0400 Subject: [PATCH] Fix systemplayer get_info test --- tests/functional/openlp_core_ui_media/test_systemplayer.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/functional/openlp_core_ui_media/test_systemplayer.py b/tests/functional/openlp_core_ui_media/test_systemplayer.py index f499f10c9..396ae910e 100644 --- a/tests/functional/openlp_core_ui_media/test_systemplayer.py +++ b/tests/functional/openlp_core_ui_media/test_systemplayer.py @@ -442,11 +442,15 @@ class TestSystemPlayer(TestCase): # THEN: The css should be empty self.assertEqual('', result) - def test_get_info(self): + @patch('openlp.core.ui.media.systemplayer.QtMultimedia.QMediaPlayer') + def test_get_info(self, MockQMediaPlayer): """ Test the get_info() method of the SystemPlayer """ # GIVEN: A SystemPlayer instance + mocked_media_player = MagicMock() + mocked_media_player.supportedMimeTypes.return_value = [] + MockQMediaPlayer.return_value = mocked_media_player player = SystemPlayer(self) # WHEN: get_info() is called