From 465ff767d6093d6976c954bd33dacd7c11da7f57 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Wed, 13 Feb 2019 14:36:37 -0700 Subject: [PATCH] Fix an unused import and some incorrect patch()s --- openlp/core/display/render.py | 4 ++-- openlp/core/lib/__init__.py | 1 - openlp/core/lib/theme.py | 1 - tests/functional/openlp_core/display/test_render.py | 4 ++-- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/openlp/core/display/render.py b/openlp/core/display/render.py index 09386cce3..f195577bd 100644 --- a/openlp/core/display/render.py +++ b/openlp/core/display/render.py @@ -31,13 +31,13 @@ import time from PyQt5 import QtWidgets, QtGui -from openlp.core.lib.formattingtags import FormattingTags from openlp.core.common import ThemeLevel -from openlp.core.common.registry import Registry, RegistryBase from openlp.core.common.mixins import LogMixin, RegistryProperties +from openlp.core.common.registry import Registry, RegistryBase from openlp.core.display.screens import ScreenList from openlp.core.display.window import DisplayWindow from openlp.core.lib import ItemCapabilities +from openlp.core.lib.formattingtags import FormattingTags log = logging.getLogger(__name__) diff --git a/openlp/core/lib/__init__.py b/openlp/core/lib/__init__.py index f4fbe639b..b2aaa082e 100644 --- a/openlp/core/lib/__init__.py +++ b/openlp/core/lib/__init__.py @@ -29,7 +29,6 @@ from PyQt5 import QtCore, QtGui, QtWidgets from openlp.core.common.i18n import translate from openlp.core.common.path import Path -from openlp.core.lib.formattingtags import FormattingTags log = logging.getLogger(__name__ + '.__init__') diff --git a/openlp/core/lib/theme.py b/openlp/core/lib/theme.py index 9214f3140..298e79df3 100644 --- a/openlp/core/lib/theme.py +++ b/openlp/core/lib/theme.py @@ -30,7 +30,6 @@ from lxml import etree, objectify from openlp.core.common import de_hump from openlp.core.common.applocation import AppLocation from openlp.core.common.json import OpenLPJsonDecoder, OpenLPJsonEncoder -from openlp.core.common.path import Path from openlp.core.display.screens import ScreenList from openlp.core.lib import get_text_file_string, str_to_bool diff --git a/tests/functional/openlp_core/display/test_render.py b/tests/functional/openlp_core/display/test_render.py index 3326dcffe..4596d1e1f 100644 --- a/tests/functional/openlp_core/display/test_render.py +++ b/tests/functional/openlp_core/display/test_render.py @@ -29,7 +29,7 @@ from openlp.core.display.render import compare_chord_lyric_width, find_formattin from openlp.core.lib.formattingtags import FormattingTags -@patch('openlp.core.lib.FormattingTags.get_html_tags') +@patch('openlp.core.display.render.FormattingTags.get_html_tags') def test_remove_tags(mocked_get_tags): """ Test remove_tags() method. @@ -52,7 +52,7 @@ def test_remove_tags(mocked_get_tags): assert result_string == expected_string, 'The strings should be identical' -@patch('openlp.core.lib.FormattingTags.get_html_tags') +@patch('openlp.core.display.render.FormattingTags.get_html_tags') def test_render_tags(mocked_get_tags): """ Test the render_tags() method.