Fix systemplayer get_info test

This commit is contained in:
Jonathan Springer 2017-05-29 13:31:56 -04:00
parent db334bfa11
commit 49a074b95e
1 changed files with 5 additions and 1 deletions

View File

@ -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