diff --git a/tests/functional/openlp_core_lib/test_projector_pjlink1.py b/tests/functional/openlp_core_lib/test_projector_pjlink1.py index 4079ab9f0..92ce02acd 100644 --- a/tests/functional/openlp_core_lib/test_projector_pjlink1.py +++ b/tests/functional/openlp_core_lib/test_projector_pjlink1.py @@ -25,10 +25,9 @@ Package to test the openlp.core.lib.projector.pjlink1 package. from unittest import TestCase -from mock import MagicMock, patch - from openlp.core.lib.projector.pjlink1 import PJLink1 +from tests.functional import patch from tests.resources.projector.data import TEST_PIN, TEST_SALT, TEST_CONNECT_AUTHENTICATE pjlink_test = PJLink1(name='test', ip='127.0.0.1', pin=TEST_PIN, no_poll=True) diff --git a/tests/functional/openlp_core_ui/test_maindisplay.py b/tests/functional/openlp_core_ui/test_maindisplay.py index 1f4649dbc..9c80740f2 100644 --- a/tests/functional/openlp_core_ui/test_maindisplay.py +++ b/tests/functional/openlp_core_ui/test_maindisplay.py @@ -142,12 +142,10 @@ class TestMainDisplay(TestCase, TestMixin): mocked_bibles_plugin.refresh_css.assert_called_with(main_display.frame) @skipUnless(is_macosx(), 'Can only run test on Mac OS X due to pyobjc dependency.') - def macosx_display_window_flags_state_test(self, is_macosx): + def macosx_display_window_flags_state_test(self): """ Test that on Mac OS X we set the proper window flags """ - if not is_macosx(): - self.skipTest('Can only run test on Mac OS X due to pyobjc dependency.') # GIVEN: A new SlideController instance on Mac OS X. self.screens.set_current_display(0) display = MagicMock() diff --git a/tests/functional/openlp_plugins/songs/test_openoffice.py b/tests/functional/openlp_plugins/songs/test_openoffice.py index 231193951..acb56939f 100644 --- a/tests/functional/openlp_plugins/songs/test_openoffice.py +++ b/tests/functional/openlp_plugins/songs/test_openoffice.py @@ -22,10 +22,13 @@ """ This module contains tests for the OpenOffice/LibreOffice importer. """ -from unittest import TestCase +from unittest import TestCase, SkipTest from openlp.core.common import Registry -from openlp.plugins.songs.lib.importers.openoffice import OpenOfficeImport +try: + from openlp.plugins.songs.lib.importers.openoffice import OpenOfficeImport +except ImportError: + raise SkipTest('Could not import OpenOfficeImport probably due to unavailability of uno') from tests.functional import MagicMock, patch from tests.helpers.testmixin import TestMixin