forked from openlp/openlp
text fixes
This commit is contained in:
parent
0387286a93
commit
7fbeb10207
@ -29,7 +29,7 @@ from PyQt5 import QtCore
|
|||||||
from openlp.core.common import Registry
|
from openlp.core.common import Registry
|
||||||
from openlp.core.lib import Renderer, ScreenList, ServiceItem, FormattingTags
|
from openlp.core.lib import Renderer, ScreenList, ServiceItem, FormattingTags
|
||||||
from openlp.core.lib.renderer import words_split, get_start_tags
|
from openlp.core.lib.renderer import words_split, get_start_tags
|
||||||
from openlp.core.lib.theme import ThemeXML
|
from openlp.core.lib.theme import Theme
|
||||||
|
|
||||||
from tests.functional import MagicMock, patch
|
from tests.functional import MagicMock, patch
|
||||||
|
|
||||||
@ -189,7 +189,7 @@ class TestRenderer(TestCase):
|
|||||||
# GIVEN: test object and data
|
# GIVEN: test object and data
|
||||||
mock_lyrics_css.return_value = ' FORMAT CSS; '
|
mock_lyrics_css.return_value = ' FORMAT CSS; '
|
||||||
mock_outline_css.return_value = ' OUTLINE CSS; '
|
mock_outline_css.return_value = ' OUTLINE CSS; '
|
||||||
theme_data = ThemeXML()
|
theme_data = Theme()
|
||||||
theme_data.font_main_name = 'Arial'
|
theme_data.font_main_name = 'Arial'
|
||||||
theme_data.font_main_size = 20
|
theme_data.font_main_size = 20
|
||||||
theme_data.font_main_color = '#FFFFFF'
|
theme_data.font_main_color = '#FFFFFF'
|
||||||
|
@ -38,7 +38,7 @@ class TestTheme(TestCase):
|
|||||||
"""
|
"""
|
||||||
Test the Theme constructor
|
Test the Theme constructor
|
||||||
"""
|
"""
|
||||||
# GIVEN: The ThemeXML class
|
# GIVEN: The Theme class
|
||||||
# WHEN: A theme object is created
|
# WHEN: A theme object is created
|
||||||
default_theme = Theme()
|
default_theme = Theme()
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ class TestTheme(TestCase):
|
|||||||
"""
|
"""
|
||||||
Test the expand_json method
|
Test the expand_json method
|
||||||
"""
|
"""
|
||||||
# GIVEN: A ThemeXML object and some JSON to "expand"
|
# GIVEN: A Theme object and some JSON to "expand"
|
||||||
theme = Theme()
|
theme = Theme()
|
||||||
theme_json = {
|
theme_json = {
|
||||||
'background': {
|
'background': {
|
||||||
@ -69,7 +69,7 @@ class TestTheme(TestCase):
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# WHEN: ThemeXML.expand_json() is run
|
# WHEN: Theme.expand_json() is run
|
||||||
theme.expand_json(theme_json)
|
theme.expand_json(theme_json)
|
||||||
|
|
||||||
# THEN: The attributes should be set on the object
|
# THEN: The attributes should be set on the object
|
||||||
@ -86,7 +86,7 @@ class TestTheme(TestCase):
|
|||||||
theme.background_type = 'video'
|
theme.background_type = 'video'
|
||||||
path = os.path.expanduser('~')
|
path = os.path.expanduser('~')
|
||||||
|
|
||||||
# WHEN: ThemeXML.extend_image_filename is run
|
# WHEN: Theme.extend_image_filename is run
|
||||||
theme.extend_image_filename(path)
|
theme.extend_image_filename(path)
|
||||||
|
|
||||||
# THEN: The filename of the background should be correct
|
# THEN: The filename of the background should be correct
|
||||||
|
Loading…
Reference in New Issue
Block a user