diff --git a/openlp/core/lib/formattingtags.py b/openlp/core/lib/formattingtags.py index 1eb24622e..3b676ccf9 100644 --- a/openlp/core/lib/formattingtags.py +++ b/openlp/core/lib/formattingtags.py @@ -185,8 +185,8 @@ class FormattingTags(object): A boolean stating whether this is a build-in tag or not. Should be ``True`` in most cases. * temporary - A temporary tag will not be saved, but is also considered when displaying text containing the tag. It has - to be a ``boolean``. + A temporary tag will not be saved, but is also considered when displaying text containing the tag. It + has to be a ``boolean``. """ FormattingTags.html_expands.extend(tags) diff --git a/openlp/plugins/media/lib/mediaitem.py b/openlp/plugins/media/lib/mediaitem.py index d39d1a893..6a4fb51da 100644 --- a/openlp/plugins/media/lib/mediaitem.py +++ b/openlp/plugins/media/lib/mediaitem.py @@ -52,10 +52,20 @@ class MediaMediaItem(MediaManagerItem, RegistryProperties): log.info('%s MediaMediaItem loaded', __name__) def __init__(self, parent, plugin): + self.setup() + super(MediaMediaItem, self).__init__(parent, plugin) + + def setup(self): + """ + Allow early setup to be mocked. + """ self.icon_path = 'images/image' self.background = False self.automatic = '' - super(MediaMediaItem, self).__init__(parent, plugin) + self.optical_icon = build_icon(':/media/media_optical.png') + self.video_icon = build_icon(':/media/media_video.png') + self.audio_icon = build_icon(':/media/media_audio.png') + self.error_icon = build_icon(':/general/general_delete.png') def setup_item(self): """ @@ -64,10 +74,6 @@ class MediaMediaItem(MediaManagerItem, RegistryProperties): self.single_service_item = False self.has_search = True self.media_object = None - self.optical_icon = build_icon(':/media/media_optical.png') - self.video_icon = build_icon(':/media/media_video.png') - self.audio_icon = build_icon(':/media/media_audio.png') - self.error_icon = build_icon(':/general/general_delete.png') self.display_controller = DisplayController(self.parent()) self.display_controller.controller_layout = QtGui.QVBoxLayout() self.media_controller.register_controller(self.display_controller)