From e607a95b866839d693a5ba6a0953f5f7a93354ef Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Sun, 21 Apr 2019 09:53:59 +0100 Subject: [PATCH] Fix tests --- .../openlp_core/ui/media/test_vlcplayer.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/tests/functional/openlp_core/ui/media/test_vlcplayer.py b/tests/functional/openlp_core/ui/media/test_vlcplayer.py index 1ae05da52..9fd111748 100644 --- a/tests/functional/openlp_core/ui/media/test_vlcplayer.py +++ b/tests/functional/openlp_core/ui/media/test_vlcplayer.py @@ -126,7 +126,7 @@ class TestVLCPlayer(TestCase, TestMixin): mocked_is_macosx.return_value = False mocked_is_win.return_value = False mocked_settings = MagicMock() - mocked_settings.value.return_value = True + mocked_settings.value.return_value = '' MockedSettings.return_value = mocked_settings mocked_qframe = MagicMock() mocked_qframe.winId.return_value = 2 @@ -150,8 +150,9 @@ class TestVLCPlayer(TestCase, TestMixin): # THEN: The VLC widget should be set up correctly assert mocked_output_display.vlc_widget == mocked_qframe mocked_qframe.setFrameStyle.assert_called_with(1) - mocked_settings.value.assert_called_with('advanced/hide mouse') - mocked_vlc.Instance.assert_called_with('--no-video-title-show --mouse-hide-timeout=0') + mocked_settings.value.assert_any_call('advanced/hide mouse') + mocked_settings.value.assert_any_call('media/vlc additions') + mocked_vlc.Instance.assert_called_with('--no-video-title-show ') assert mocked_output_display.vlc_instance == mocked_instance mocked_instance.media_player_new.assert_called_with() assert mocked_output_display.vlc_media_player == mocked_media_player_new @@ -175,7 +176,7 @@ class TestVLCPlayer(TestCase, TestMixin): mocked_is_macosx.return_value = False mocked_is_win.return_value = False mocked_settings = MagicMock() - mocked_settings.value.return_value = True + mocked_settings.value.return_value = '' MockedSettings.return_value = mocked_settings mocked_qframe = MagicMock() mocked_qframe.winId.return_value = 2 @@ -197,7 +198,7 @@ class TestVLCPlayer(TestCase, TestMixin): vlc_player.setup(mocked_output_display, mocked_controller) # THEN: The VLC instance should be created with the correct options - mocked_vlc.Instance.assert_called_with('--no-video-title-show --mouse-hide-timeout=0') + mocked_vlc.Instance.assert_called_with('--no-video-title-show ') @patch('openlp.core.ui.media.vlcplayer.is_win') @patch('openlp.core.ui.media.vlcplayer.is_macosx') @@ -213,7 +214,7 @@ class TestVLCPlayer(TestCase, TestMixin): mocked_is_macosx.return_value = False mocked_is_win.return_value = False mocked_settings = MagicMock() - mocked_settings.value.return_value = False + mocked_settings.value.return_value = '' MockedSettings.return_value = mocked_settings mocked_qframe = MagicMock() mocked_qframe.winId.return_value = 2 @@ -235,7 +236,7 @@ class TestVLCPlayer(TestCase, TestMixin): vlc_player.setup(mocked_output_display, mocked_controller) # THEN: The VLC instance should be created with the correct options - mocked_vlc.Instance.assert_called_with('--no-video-title-show') + mocked_vlc.Instance.assert_called_with('--no-video-title-show ') @patch('openlp.core.ui.media.vlcplayer.is_win') @patch('openlp.core.ui.media.vlcplayer.is_macosx') @@ -863,7 +864,7 @@ class TestVLCPlayer(TestCase, TestMixin): # THEN: nothing should happen mocked_display.vlc_media_player.is_seekable.assert_called_with() - mocked_display.vlc_media_player.set_time.assert_called_with(5000) + mocked_display.vlc_media_player.set_time.assert_called_with(2000) def test_reset(self): """