forked from openlp/openlp
tests
This commit is contained in:
parent
f9e20e2108
commit
cfc487d623
@ -20,9 +20,9 @@
|
||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||
###############################################################################
|
||||
|
||||
from openlp.core.api.http.endpoint import Endpoint
|
||||
from openlp.core.api.http import register_endpoint, requires_auth
|
||||
from openlp.core.api.tab import ApiTab
|
||||
from openlp.core.api.http.endpoint import Endpoint
|
||||
from openlp.core.api.poll import Poller
|
||||
from openlp.core.api.tab import ApiTab
|
||||
|
||||
__all__ = ['Endpoint', 'ApiTab', 'register_endpoint', 'requires_auth']
|
||||
|
@ -25,8 +25,8 @@ Download and "install" the remote web client
|
||||
from zipfile import ZipFile
|
||||
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.common.httputils import url_get_file, get_web_page, get_url_file_size
|
||||
from openlp.core.common.registry import Registry
|
||||
|
||||
|
||||
def deploy_zipfile(app_root_path, zip_name):
|
||||
|
@ -1,6 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
|
||||
|
||||
import json
|
||||
###############################################################################
|
||||
# OpenLP - Open Source Lyrics Projection #
|
||||
# --------------------------------------------------------------------------- #
|
||||
@ -21,12 +22,11 @@
|
||||
###############################################################################
|
||||
import logging
|
||||
import os
|
||||
import urllib.request
|
||||
import urllib.error
|
||||
import json
|
||||
import urllib.request
|
||||
|
||||
from openlp.core.api.http.endpoint import Endpoint
|
||||
from openlp.core.api.http import requires_auth
|
||||
from openlp.core.api.http.endpoint import Endpoint
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
from openlp.core.common.path import Path
|
||||
from openlp.core.common.registry import Registry
|
||||
|
@ -27,11 +27,10 @@ import os
|
||||
|
||||
from openlp.core.api.http import requires_auth
|
||||
from openlp.core.api.http.endpoint import Endpoint
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.common.i18n import UiStrings, translate
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.lib import PluginStatus, StringContent, image_to_byte
|
||||
|
||||
|
||||
template_dir = 'templates'
|
||||
static_dir = 'static'
|
||||
blank_dir = os.path.join(static_dir, 'index')
|
||||
|
@ -21,9 +21,8 @@
|
||||
###############################################################################
|
||||
import logging
|
||||
|
||||
from openlp.core.api.http.endpoint import Endpoint
|
||||
from openlp.core.api.endpoint.core import TRANSLATED_STRINGS
|
||||
|
||||
from openlp.core.api.http.endpoint import Endpoint
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
|
||||
|
||||
import json
|
||||
###############################################################################
|
||||
# OpenLP - Open Source Lyrics Projection #
|
||||
# --------------------------------------------------------------------------- #
|
||||
@ -20,13 +21,11 @@
|
||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||
###############################################################################
|
||||
import logging
|
||||
import json
|
||||
|
||||
from openlp.core.api.http import requires_auth
|
||||
from openlp.core.api.http.endpoint import Endpoint
|
||||
from openlp.core.common.registry import Registry
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
service_endpoint = Endpoint('service')
|
||||
|
@ -22,10 +22,11 @@
|
||||
|
||||
import base64
|
||||
from functools import wraps
|
||||
|
||||
from webob import Response
|
||||
|
||||
from openlp.core.common.settings import Settings
|
||||
from openlp.core.api.http.wsgiapp import WSGIApplication
|
||||
from openlp.core.common.settings import Settings
|
||||
from .errors import NotFound, ServerError, HttpError
|
||||
|
||||
application = WSGIApplication('api')
|
||||
|
@ -32,18 +32,18 @@ from waitress import serve
|
||||
from openlp.core.api.deploy import download_and_check, download_sha256
|
||||
from openlp.core.api.endpoint.controller import controller_endpoint, api_controller_endpoint
|
||||
from openlp.core.api.endpoint.core import chords_endpoint, stage_endpoint, blank_endpoint, main_endpoint
|
||||
from openlp.core.api.endpoint.service import service_endpoint, api_service_endpoint
|
||||
from openlp.core.api.endpoint.remote import remote_endpoint
|
||||
from openlp.core.api.http import register_endpoint
|
||||
from openlp.core.api.endpoint.service import service_endpoint, api_service_endpoint
|
||||
from openlp.core.api.http import application
|
||||
from openlp.core.api.http import register_endpoint
|
||||
from openlp.core.api.poll import Poller
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
from openlp.core.common.i18n import UiStrings
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.common.mixins import LogMixin, RegistryProperties
|
||||
from openlp.core.common.path import create_paths
|
||||
from openlp.core.common.registry import Registry, RegistryBase
|
||||
from openlp.core.common.settings import Settings
|
||||
from openlp.core.common.i18n import translate
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
@ -30,9 +30,8 @@ import re
|
||||
from webob import Request, Response
|
||||
from webob.static import DirectoryApp
|
||||
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
from openlp.core.api.http.errors import HttpError, NotFound, ServerError
|
||||
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
|
||||
ARGS_REGEX = re.compile(r'''\{(\w+)(?::([^}]+))?\}''', re.VERBOSE)
|
||||
|
||||
|
@ -24,11 +24,11 @@ The :mod:`http` module contains the API web server. This is a lightweight web se
|
||||
with OpenLP. It uses JSON to communicate with the remotes.
|
||||
"""
|
||||
import asyncio
|
||||
import websockets
|
||||
import json
|
||||
import logging
|
||||
import time
|
||||
|
||||
import websockets
|
||||
from PyQt5 import QtCore
|
||||
|
||||
from openlp.core.common.mixins import LogMixin, RegistryProperties
|
||||
|
@ -42,7 +42,6 @@ from openlp.core.common.mixins import LogMixin
|
||||
from openlp.core.common.path import create_paths, copytree
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.common.settings import Settings
|
||||
from openlp.core.version import check_for_update, get_version
|
||||
from openlp.core.display.screens import ScreenList
|
||||
from openlp.core.resources import qInitResources
|
||||
from openlp.core.ui import SplashScreen
|
||||
@ -51,7 +50,7 @@ from openlp.core.ui.firsttimeform import FirstTimeForm
|
||||
from openlp.core.ui.firsttimelanguageform import FirstTimeLanguageForm
|
||||
from openlp.core.ui.mainwindow import MainWindow
|
||||
from openlp.core.ui.style import get_application_stylesheet
|
||||
|
||||
from openlp.core.version import check_for_update, get_version
|
||||
|
||||
__all__ = ['OpenLP', 'main']
|
||||
|
||||
|
@ -30,13 +30,13 @@ import os
|
||||
import re
|
||||
import sys
|
||||
import traceback
|
||||
from chardet.universaldetector import UniversalDetector
|
||||
from ipaddress import IPv4Address, IPv6Address, AddressValueError
|
||||
from shutil import which
|
||||
from subprocess import check_output, CalledProcessError, STDOUT
|
||||
|
||||
from PyQt5 import QtGui
|
||||
from PyQt5.QtCore import QCryptographicHash as QHash
|
||||
from chardet.universaldetector import UniversalDetector
|
||||
|
||||
log = logging.getLogger(__name__ + '.__init__')
|
||||
|
||||
|
@ -29,7 +29,6 @@ from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from openlp.core.common.settings import Settings
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
@ -27,7 +27,6 @@ from copy import deepcopy
|
||||
|
||||
import sqlalchemy
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
@ -22,8 +22,8 @@
|
||||
"""
|
||||
Provide Error Handling and login Services
|
||||
"""
|
||||
import logging
|
||||
import inspect
|
||||
import logging
|
||||
|
||||
from openlp.core.common import is_win, trace_error_handler
|
||||
from openlp.core.common.registry import Registry
|
||||
|
@ -23,8 +23,8 @@
|
||||
This class contains the core default settings.
|
||||
"""
|
||||
import datetime
|
||||
import logging
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
from tempfile import gettempdir
|
||||
|
||||
|
@ -21,10 +21,11 @@
|
||||
###############################################################################
|
||||
|
||||
import re
|
||||
|
||||
from string import Template
|
||||
|
||||
from PyQt5 import QtGui, QtCore, QtWebKitWidgets
|
||||
|
||||
from openlp.core.common import ThemeLevel
|
||||
from openlp.core.common.mixins import LogMixin, RegistryProperties
|
||||
from openlp.core.common.path import path_to_str
|
||||
from openlp.core.common.registry import Registry, RegistryBase
|
||||
@ -32,7 +33,6 @@ from openlp.core.common.settings import Settings
|
||||
from openlp.core.display.screens import ScreenList
|
||||
from openlp.core.lib import FormattingTags, ImageSource, ItemCapabilities, ServiceItem, expand_tags, build_chords_css, \
|
||||
build_lyrics_format_css, build_lyrics_outline_css
|
||||
from openlp.core.common import ThemeLevel
|
||||
from openlp.core.ui.maindisplay import MainDisplay
|
||||
|
||||
VERSE = 'The Lord said to {r}Noah{/r}: \n' \
|
||||
|
@ -23,14 +23,14 @@
|
||||
The :mod:`screen` module provides management functionality for a machines'
|
||||
displays.
|
||||
"""
|
||||
import logging
|
||||
import copy
|
||||
import logging
|
||||
|
||||
from PyQt5 import QtCore
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.common.settings import Settings
|
||||
from openlp.core.common.i18n import translate
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
@ -25,8 +25,8 @@ OpenLP work.
|
||||
"""
|
||||
import html
|
||||
import logging
|
||||
import re
|
||||
import math
|
||||
import re
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
@ -24,8 +24,8 @@ Provide HTML Tag management and Formatting Tag access class
|
||||
"""
|
||||
import json
|
||||
|
||||
from openlp.core.common.settings import Settings
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.common.settings import Settings
|
||||
|
||||
|
||||
class FormattingTags(object):
|
||||
|
@ -407,8 +407,8 @@ is the function which has to be called from outside. The generated and returned
|
||||
</html>
|
||||
"""
|
||||
import logging
|
||||
|
||||
from string import Template
|
||||
|
||||
from PyQt5 import QtWebKit
|
||||
|
||||
from openlp.core.common.settings import Settings
|
||||
|
@ -26,8 +26,8 @@ wait for the conversion to happen.
|
||||
"""
|
||||
import logging
|
||||
import os
|
||||
import time
|
||||
import queue
|
||||
import time
|
||||
|
||||
from PyQt5 import QtCore
|
||||
|
||||
|
@ -28,8 +28,8 @@ import re
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import UiStrings, translate
|
||||
from openlp.core.common.path import path_to_str, str_to_path
|
||||
from openlp.core.common.mixins import RegistryProperties
|
||||
from openlp.core.common.path import path_to_str, str_to_path
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.common.settings import Settings
|
||||
from openlp.core.lib import ServiceItem, StringContent, ServiceItemContext
|
||||
|
@ -26,9 +26,9 @@ type and capability of an item.
|
||||
import datetime
|
||||
import html
|
||||
import logging
|
||||
import ntpath
|
||||
import os
|
||||
import uuid
|
||||
import ntpath
|
||||
|
||||
from PyQt5 import QtGui
|
||||
|
||||
|
@ -32,7 +32,6 @@ from openlp.core.common.i18n import UiStrings, translate
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.lib import build_icon
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
@ -30,8 +30,8 @@ from PyQt5 import QtCore, QtWidgets
|
||||
from openlp.core.common import verify_ip_address
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.lib import build_icon
|
||||
from openlp.core.projectors.db import Projector
|
||||
from openlp.core.projectors.constants import PJLINK_PORT
|
||||
from openlp.core.projectors.db import Projector
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
log.debug('editform loaded')
|
||||
|
@ -39,8 +39,8 @@ from openlp.core.projectors.constants import ERROR_MSG, ERROR_STRING, E_AUTHENTI
|
||||
E_NETWORK, E_NOT_CONNECTED, E_UNKNOWN_SOCKET_ERROR, STATUS_STRING, S_CONNECTED, S_CONNECTING, S_COOLDOWN, \
|
||||
S_INITIALIZE, S_NOT_CONNECTED, S_OFF, S_ON, S_STANDBY, S_WARMUP
|
||||
from openlp.core.projectors.db import ProjectorDB
|
||||
from openlp.core.projectors.pjlink import PJLink, PJLinkUDP
|
||||
from openlp.core.projectors.editform import ProjectorEditForm
|
||||
from openlp.core.projectors.pjlink import PJLink, PJLinkUDP
|
||||
from openlp.core.projectors.sourceselectform import SourceSelectTabs, SourceSelectSingle
|
||||
from openlp.core.widgets.toolbar import OpenLPToolbar
|
||||
|
||||
|
@ -31,8 +31,8 @@ from PyQt5 import QtCore, QtWidgets
|
||||
from openlp.core.common import is_macosx
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.lib import build_icon
|
||||
from openlp.core.projectors.db import ProjectorSource
|
||||
from openlp.core.projectors.constants import PJLINK_DEFAULT_SOURCES, PJLINK_DEFAULT_CODES
|
||||
from openlp.core.projectors.db import ProjectorSource
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
@ -26,8 +26,8 @@ import webbrowser
|
||||
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.version import get_version
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.version import get_version
|
||||
from .aboutdialog import UiAboutDialog
|
||||
|
||||
|
||||
|
@ -26,9 +26,9 @@ import logging
|
||||
import os
|
||||
import socket
|
||||
import time
|
||||
import urllib.request
|
||||
import urllib.parse
|
||||
import urllib.error
|
||||
import urllib.parse
|
||||
import urllib.request
|
||||
from configparser import ConfigParser, MissingSectionHeaderError, NoOptionError, NoSectionError
|
||||
from tempfile import gettempdir
|
||||
|
||||
@ -36,14 +36,14 @@ from PyQt5 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common import clean_button_text, trace_error_handler
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
from openlp.core.common.httputils import get_web_page, get_url_file_size, url_get_file, CONNECTION_TIMEOUT
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.common.path import Path, create_paths
|
||||
from openlp.core.common.mixins import RegistryProperties
|
||||
from openlp.core.common.path import Path, create_paths
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.common.settings import Settings
|
||||
from openlp.core.lib import PluginStatus, build_icon
|
||||
from openlp.core.lib.ui import critical_error_message_box
|
||||
from openlp.core.common.httputils import get_web_page, get_url_file_size, url_get_file, CONNECTION_TIMEOUT
|
||||
from .firsttimewizard import UiFirstTimeWizard, FirstTimePage
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
@ -28,8 +28,8 @@ from PyQt5 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.lib import FormattingTags
|
||||
from openlp.core.ui.formattingtagdialog import Ui_FormattingTagDialog
|
||||
from openlp.core.ui.formattingtagcontroller import FormattingTagController
|
||||
from openlp.core.ui.formattingtagdialog import Ui_FormattingTagDialog
|
||||
|
||||
|
||||
class EditColumn(object):
|
||||
|
@ -23,8 +23,6 @@
|
||||
This is the main window, where all the action happens.
|
||||
"""
|
||||
import logging
|
||||
import os
|
||||
import shutil
|
||||
import sys
|
||||
import time
|
||||
from datetime import datetime
|
||||
@ -40,25 +38,24 @@ from openlp.core.common import is_win, is_macosx, add_actions
|
||||
from openlp.core.common.actions import ActionList, CategoryOrder
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
from openlp.core.common.i18n import LanguageManager, UiStrings, translate
|
||||
from openlp.core.common.path import Path, copyfile, create_paths
|
||||
from openlp.core.common.mixins import RegistryProperties
|
||||
from openlp.core.common.path import Path, copyfile, create_paths
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.common.settings import Settings
|
||||
from openlp.core.display.screens import ScreenList
|
||||
from openlp.core.display.renderer import Renderer
|
||||
from openlp.core.display.screens import ScreenList
|
||||
from openlp.core.lib import PluginManager, ImageManager, PluginStatus, build_icon
|
||||
from openlp.core.lib.ui import create_action
|
||||
from openlp.core.projectors.manager import ProjectorManager
|
||||
from openlp.core.ui import AboutForm, SettingsForm, ServiceManager, ThemeManager, LiveController, PluginForm, \
|
||||
ShortcutListForm, FormattingTagForm, PreviewController
|
||||
from openlp.core.ui.firsttimeform import FirstTimeForm
|
||||
from openlp.core.widgets.dialogs import FileDialog
|
||||
from openlp.core.widgets.docks import OpenLPDockWidget, MediaDockManager
|
||||
from openlp.core.ui.media import MediaController
|
||||
from openlp.core.ui.printserviceform import PrintServiceForm
|
||||
from openlp.core.ui.style import PROGRESSBAR_STYLE, get_library_stylesheet
|
||||
from openlp.core.version import get_version
|
||||
|
||||
from openlp.core.widgets.dialogs import FileDialog
|
||||
from openlp.core.widgets.docks import OpenLPDockWidget, MediaDockManager
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
@ -24,8 +24,8 @@ The :mod:`~openlp.core.api.endpoint` module contains various API endpoints
|
||||
"""
|
||||
import logging
|
||||
|
||||
from openlp.core.api.http.endpoint import Endpoint
|
||||
from openlp.core.api.http import requires_auth
|
||||
from openlp.core.api.http.endpoint import Endpoint
|
||||
from openlp.core.common.registry import Registry
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
@ -23,9 +23,10 @@
|
||||
The :mod:`~openlp.core.ui.media.mediacontroller` module contains a base class for media components and other widgets
|
||||
related to playing media, such as sliders.
|
||||
"""
|
||||
import datetime
|
||||
import logging
|
||||
import os
|
||||
import datetime
|
||||
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.api.http import register_endpoint
|
||||
@ -37,14 +38,13 @@ from openlp.core.common.settings import Settings
|
||||
from openlp.core.lib import ItemCapabilities
|
||||
from openlp.core.lib.ui import critical_error_message_box
|
||||
from openlp.core.ui import DisplayControllerType
|
||||
from openlp.core.ui.media.endpoint import media_endpoint
|
||||
from openlp.core.ui.media.vendor.mediainfoWrapper import MediaInfoWrapper
|
||||
from openlp.core.ui.media.mediaplayer import MediaPlayer
|
||||
from openlp.core.ui.media import MediaState, MediaInfo, MediaType, get_media_players, set_media_players,\
|
||||
from openlp.core.ui.media import MediaState, MediaInfo, MediaType, get_media_players, set_media_players, \
|
||||
parse_optical_path
|
||||
from openlp.core.ui.media.endpoint import media_endpoint
|
||||
from openlp.core.ui.media.mediaplayer import MediaPlayer
|
||||
from openlp.core.ui.media.vendor.mediainfoWrapper import MediaInfoWrapper
|
||||
from openlp.core.widgets.toolbar import OpenLPToolbar
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
TICK_TIME = 200
|
||||
|
@ -32,7 +32,6 @@ from openlp.core.common.i18n import translate
|
||||
from openlp.core.ui.media import MediaState
|
||||
from openlp.core.ui.media.mediaplayer import MediaPlayer
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
ADDITIONAL_EXT = {
|
||||
|
5
openlp/core/ui/media/vendor/vlc.py
vendored
5
openlp/core/ui/media/vendor/vlc.py
vendored
@ -40,11 +40,10 @@ C{get_instance} method of L{MediaPlayer} and L{MediaListPlayer}.
|
||||
"""
|
||||
|
||||
import ctypes
|
||||
from ctypes.util import find_library
|
||||
import functools
|
||||
import os
|
||||
import sys
|
||||
import functools
|
||||
|
||||
from ctypes.util import find_library
|
||||
# Used by EventManager in override.py
|
||||
from inspect import getargspec
|
||||
|
||||
|
@ -22,13 +22,14 @@
|
||||
"""
|
||||
The :mod:`~openlp.core.ui.media.vlcplayer` module contains our VLC component wrapper
|
||||
"""
|
||||
from datetime import datetime
|
||||
from distutils.version import LooseVersion
|
||||
import ctypes
|
||||
import logging
|
||||
import os
|
||||
import threading
|
||||
import sys
|
||||
import ctypes
|
||||
import threading
|
||||
from datetime import datetime
|
||||
from distutils.version import LooseVersion
|
||||
|
||||
from PyQt5 import QtWidgets
|
||||
|
||||
from openlp.core.common import is_win, is_macosx, is_linux
|
||||
|
@ -26,8 +26,8 @@ import logging
|
||||
|
||||
from PyQt5 import QtGui, QtWebKitWidgets
|
||||
|
||||
from openlp.core.common.settings import Settings
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.common.settings import Settings
|
||||
from openlp.core.ui.media import MediaState
|
||||
from openlp.core.ui.media.mediaplayer import MediaPlayer
|
||||
|
||||
|
@ -24,8 +24,8 @@ The actual print service dialog
|
||||
"""
|
||||
import datetime
|
||||
import html
|
||||
import lxml.html
|
||||
|
||||
import lxml.html
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets, QtPrintSupport
|
||||
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
|
@ -42,7 +42,6 @@ from openlp.core.ui import HideMode, MainDisplay, Display, DisplayControllerType
|
||||
from openlp.core.widgets.toolbar import OpenLPToolbar
|
||||
from openlp.core.widgets.views import ListPreviewWidget
|
||||
|
||||
|
||||
# Threshold which has to be trespassed to toggle.
|
||||
HIDE_MENU_THRESHOLD = 27
|
||||
AUDIO_TIME_LABEL_STYLESHEET = 'background-color: palette(background); ' \
|
||||
|
@ -24,7 +24,7 @@ The :mod:`~openlp.core.ui.dark` module looks for and loads a dark theme
|
||||
"""
|
||||
from PyQt5 import QtGui
|
||||
|
||||
from openlp.core.common import is_macosx, is_win
|
||||
from openlp.core.common import is_win
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.common.settings import Settings
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
""" Patch the QFileDialog so it accepts and returns Path objects"""
|
||||
from PyQt5 import QtWidgets
|
||||
|
||||
from openlp.core.common.path import Path, path_to_str, replace_params, str_to_path
|
||||
from openlp.core.common.path import path_to_str, replace_params, str_to_path
|
||||
|
||||
|
||||
class FileDialog(QtWidgets.QFileDialog):
|
||||
|
@ -25,8 +25,8 @@ Functional tests to test the Http Server Class.
|
||||
from unittest import TestCase
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.api.http.server import HttpServer
|
||||
from openlp.core.common.registry import Registry
|
||||
|
||||
|
||||
class TestHttpServer(TestCase):
|
||||
|
@ -23,12 +23,11 @@
|
||||
Functional test the routing code.
|
||||
"""
|
||||
import os
|
||||
|
||||
from unittest import TestCase
|
||||
from unittest.mock import MagicMock
|
||||
|
||||
from openlp.core.api.http.endpoint import Endpoint
|
||||
from openlp.core.api.http import register_endpoint, application, NotFound
|
||||
from openlp.core.api.http.endpoint import Endpoint
|
||||
|
||||
ROOT_DIR = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
|
@ -25,10 +25,9 @@ Package to test the openlp.core.ui.media package.
|
||||
from unittest import TestCase
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.ui.media.mediacontroller import MediaController
|
||||
from openlp.core.ui.media.mediaplayer import MediaPlayer
|
||||
from openlp.core.common.registry import Registry
|
||||
|
||||
from tests.helpers.testmixin import TestMixin
|
||||
|
||||
|
||||
|
@ -31,7 +31,6 @@ from unittest.mock import MagicMock, patch, call
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.ui.media import MediaState, MediaType
|
||||
from openlp.core.ui.media.vlcplayer import AUDIO_EXT, VIDEO_EXT, VlcPlayer, get_vlc
|
||||
|
||||
from tests.helpers import MockDateTime
|
||||
from tests.helpers.testmixin import TestMixin
|
||||
|
||||
|
@ -28,9 +28,8 @@ from unittest.mock import MagicMock, patch, call
|
||||
from lxml import objectify
|
||||
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.plugins.bibles.lib.importers.opensong import OpenSongBible, get_text, parse_chapter_number
|
||||
from openlp.plugins.bibles.lib.bibleimport import BibleImport
|
||||
|
||||
from openlp.plugins.bibles.lib.importers.opensong import OpenSongBible, get_text, parse_chapter_number
|
||||
from tests.helpers.testmixin import TestMixin
|
||||
from tests.utils import load_external_result_data
|
||||
from tests.utils.constants import RESOURCE_PATH
|
||||
|
@ -27,7 +27,6 @@ from unittest.mock import MagicMock, patch, call
|
||||
|
||||
from openlp.core.common.path import Path
|
||||
from openlp.plugins.bibles.lib.importers.wordproject import WordProjectBible
|
||||
|
||||
from tests.utils.constants import RESOURCE_PATH
|
||||
|
||||
TEST_PATH = RESOURCE_PATH / 'bibles'
|
||||
|
@ -30,7 +30,6 @@ from PyQt5 import QtCore
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.lib import ServiceItem, PluginStatus
|
||||
from openlp.plugins.custom.lib import CustomMediaItem
|
||||
|
||||
from tests.helpers.testmixin import TestMixin
|
||||
|
||||
FOOTER = ['Arky Arky (Unknown)', 'Public Domain', 'CCLI 123456']
|
||||
|
@ -30,7 +30,6 @@ from PyQt5 import QtWidgets
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.common.settings import Settings
|
||||
from openlp.plugins.images.lib import ImageTab
|
||||
|
||||
from tests.helpers.testmixin import TestMixin
|
||||
|
||||
__default_settings__ = {
|
||||
|
@ -27,8 +27,8 @@ from unittest.mock import ANY, MagicMock, patch
|
||||
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.common.path import Path
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.plugins.images.lib.db import ImageFilenames, ImageGroups
|
||||
from openlp.plugins.images.lib.mediaitem import ImageMediaItem
|
||||
|
||||
|
@ -34,7 +34,6 @@ from openlp.core.common.settings import Settings
|
||||
from openlp.core.lib.db import Manager
|
||||
from openlp.plugins.images.lib import upgrade
|
||||
from openlp.plugins.images.lib.db import ImageFilenames, init_schema
|
||||
|
||||
from tests.helpers.testmixin import TestMixin
|
||||
from tests.utils.constants import TEST_RESOURCES_PATH
|
||||
|
||||
|
@ -22,18 +22,17 @@
|
||||
"""
|
||||
Functional tests to test the Impress class and related methods.
|
||||
"""
|
||||
from unittest import TestCase
|
||||
from unittest.mock import MagicMock, patch
|
||||
import shutil
|
||||
from tempfile import mkdtemp
|
||||
from unittest import TestCase
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
from openlp.core.common.settings import Settings
|
||||
from openlp.core.common.path import Path
|
||||
from openlp.core.common.settings import Settings
|
||||
from openlp.plugins.presentations.lib.impresscontroller import ImpressController, ImpressDocument, TextType
|
||||
from openlp.plugins.presentations.presentationplugin import __default_settings__
|
||||
|
||||
from tests.utils.constants import TEST_RESOURCES_PATH
|
||||
from tests.helpers.testmixin import TestMixin
|
||||
from tests.utils.constants import TEST_RESOURCES_PATH
|
||||
|
||||
|
||||
class TestImpressController(TestCase, TestMixin):
|
||||
|
@ -25,10 +25,9 @@ This module contains tests for the lib submodule of the Presentations plugin.
|
||||
from unittest import TestCase
|
||||
from unittest.mock import patch, MagicMock, call
|
||||
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.common.path import Path
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.plugins.presentations.lib.mediaitem import PresentationMediaItem
|
||||
|
||||
from tests.helpers.testmixin import TestMixin
|
||||
|
||||
|
||||
|
@ -28,7 +28,6 @@ from unittest.mock import patch, MagicMock
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.plugins.presentations.lib.mediaitem import MessageListener, PresentationMediaItem
|
||||
from openlp.plugins.presentations.lib.messagelistener import Controller
|
||||
|
||||
from tests.helpers.testmixin import TestMixin
|
||||
|
||||
|
||||
|
@ -23,20 +23,18 @@
|
||||
This module contains tests for the PdfController
|
||||
"""
|
||||
import os
|
||||
import shutil
|
||||
from tempfile import mkdtemp
|
||||
from unittest import TestCase, SkipTest
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
from PyQt5 import QtCore, QtGui
|
||||
|
||||
from openlp.plugins.presentations.lib.pdfcontroller import PdfController, PdfDocument
|
||||
from openlp.core.common.settings import Settings
|
||||
from openlp.core.common.path import Path
|
||||
from openlp.core.common.settings import Settings
|
||||
from openlp.core.display.screens import ScreenList
|
||||
|
||||
from tests.utils.constants import TEST_RESOURCES_PATH
|
||||
from openlp.plugins.presentations.lib.pdfcontroller import PdfController, PdfDocument
|
||||
from tests.helpers.testmixin import TestMixin
|
||||
from tests.utils.constants import TEST_RESOURCES_PATH
|
||||
|
||||
__default_settings__ = {
|
||||
'presentations/enable_pdf_program': False,
|
||||
|
@ -24,15 +24,14 @@ Functional tests to test the PowerPointController class and related methods.
|
||||
"""
|
||||
import os
|
||||
import shutil
|
||||
from tempfile import mkdtemp
|
||||
from unittest import TestCase
|
||||
from unittest.mock import patch, MagicMock
|
||||
from tempfile import mkdtemp
|
||||
|
||||
from openlp.core.common import is_win
|
||||
from openlp.core.common.settings import Settings
|
||||
from openlp.plugins.presentations.lib.powerpointcontroller import PowerpointController, PowerpointDocument, \
|
||||
_get_text_from_shapes
|
||||
|
||||
from tests.helpers.testmixin import TestMixin
|
||||
from tests.utils.constants import TEST_RESOURCES_PATH
|
||||
|
||||
|
@ -27,10 +27,9 @@ from tempfile import mkdtemp
|
||||
from unittest import TestCase, skipIf
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
from openlp.plugins.presentations.lib.pptviewcontroller import PptviewDocument, PptviewController
|
||||
from openlp.core.common import is_win
|
||||
from openlp.core.common.path import Path
|
||||
|
||||
from openlp.plugins.presentations.lib.pptviewcontroller import PptviewDocument, PptviewController
|
||||
from tests.helpers.testmixin import TestMixin
|
||||
from tests.utils.constants import TEST_RESOURCES_PATH
|
||||
|
||||
|
@ -26,8 +26,8 @@ from unittest import TestCase
|
||||
|
||||
from openlp.core.common import is_not_image_file
|
||||
from openlp.core.common.path import Path
|
||||
from tests.utils.constants import TEST_RESOURCES_PATH
|
||||
from tests.helpers.testmixin import TestMixin
|
||||
from tests.utils.constants import TEST_RESOURCES_PATH
|
||||
|
||||
|
||||
class TestUtils(TestCase, TestMixin):
|
||||
|
@ -22,19 +22,18 @@
|
||||
"""
|
||||
Package to test the openlp.core.lib.pluginmanager package.
|
||||
"""
|
||||
import sys
|
||||
import gc
|
||||
import sys
|
||||
from tempfile import mkdtemp
|
||||
from unittest import TestCase
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
from PyQt5 import QtWidgets
|
||||
|
||||
from openlp.core.common.path import Path
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.common.settings import Settings
|
||||
from openlp.core.common.path import Path
|
||||
from openlp.core.lib.pluginmanager import PluginManager
|
||||
|
||||
from tests.helpers.testmixin import TestMixin
|
||||
|
||||
|
||||
|
@ -25,7 +25,6 @@ Package to test the openlp.core.ui.media package.
|
||||
from unittest import TestCase
|
||||
|
||||
from openlp.core.ui.media.vendor.mediainfoWrapper import MediaInfoWrapper
|
||||
|
||||
from tests.utils.constants import RESOURCE_PATH
|
||||
|
||||
TEST_PATH = RESOURCE_PATH / 'media'
|
||||
|
@ -29,7 +29,6 @@ from PyQt5 import QtTest, QtWidgets
|
||||
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.ui import filerenameform
|
||||
|
||||
from tests.helpers.testmixin import TestMixin
|
||||
|
||||
|
||||
|
@ -27,7 +27,6 @@ from unittest.mock import MagicMock, patch
|
||||
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.ui.mainwindow import MainWindow
|
||||
|
||||
from tests.helpers.testmixin import TestMixin
|
||||
|
||||
|
||||
|
@ -30,10 +30,8 @@ from unittest.mock import patch
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.projectors.db import Projector, ProjectorDB
|
||||
from openlp.core.projectors.editform import ProjectorEditForm
|
||||
from openlp.core.projectors.manager import ProjectorManager
|
||||
|
||||
from tests.helpers.testmixin import TestMixin
|
||||
from tests.resources.projector.data import TEST_DB, TEST1_DATA, TEST2_DATA
|
||||
from tests.resources.projector.data import TEST_DB, TEST1_DATA
|
||||
|
||||
|
||||
class TestProjectorEditForm(TestCase, TestMixin):
|
||||
|
@ -30,7 +30,6 @@ from openlp.core.common.registry import Registry
|
||||
from openlp.core.projectors.db import ProjectorDB
|
||||
from openlp.core.projectors.editform import ProjectorEditForm
|
||||
from openlp.core.projectors.manager import ProjectorManager
|
||||
|
||||
from tests.helpers.testmixin import TestMixin
|
||||
from tests.resources.projector.data import TEST_DB
|
||||
|
||||
|
@ -32,10 +32,9 @@ from unittest.mock import patch
|
||||
from PyQt5.QtWidgets import QDialog
|
||||
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.projectors.db import ProjectorDB, Projector
|
||||
from openlp.core.projectors.constants import PJLINK_DEFAULT_CODES, PJLINK_DEFAULT_SOURCES
|
||||
from openlp.core.projectors.db import ProjectorDB, Projector
|
||||
from openlp.core.projectors.sourceselectform import source_group, SourceSelectSingle
|
||||
|
||||
from tests.helpers.testmixin import TestMixin
|
||||
from tests.resources.projector.data import TEST_DB, TEST1_DATA
|
||||
|
||||
|
@ -30,7 +30,6 @@ from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.lib import ServiceItem, ItemCapabilities
|
||||
from openlp.core.ui.servicemanager import ServiceManager
|
||||
|
||||
from tests.helpers.testmixin import TestMixin
|
||||
|
||||
|
||||
|
@ -29,7 +29,6 @@ from PyQt5 import QtCore, QtTest, QtWidgets
|
||||
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.ui import servicenoteform
|
||||
|
||||
from tests.helpers.testmixin import TestMixin
|
||||
|
||||
|
||||
|
@ -28,9 +28,8 @@ from unittest.mock import MagicMock, patch
|
||||
from PyQt5 import QtCore, QtTest
|
||||
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.ui import settingsform
|
||||
from openlp.core.display.screens import ScreenList
|
||||
|
||||
from openlp.core.ui import settingsform
|
||||
from tests.helpers.testmixin import TestMixin
|
||||
|
||||
SCREEN = {
|
||||
|
@ -29,7 +29,6 @@ from PyQt5 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.ui.shortcutlistform import ShortcutListForm
|
||||
|
||||
from tests.helpers.testmixin import TestMixin
|
||||
|
||||
|
||||
|
@ -29,7 +29,6 @@ from PyQt5 import QtCore, QtTest, QtWidgets
|
||||
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.ui import starttimeform
|
||||
|
||||
from tests.helpers.testmixin import TestMixin
|
||||
|
||||
|
||||
|
@ -25,11 +25,10 @@ Interface tests to test the themeManager class and related methods.
|
||||
from unittest import TestCase
|
||||
from unittest.mock import patch, MagicMock
|
||||
|
||||
from openlp.core.common.path import Path
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.common.settings import Settings
|
||||
from openlp.core.common.path import Path
|
||||
from openlp.core.ui import ThemeManager
|
||||
|
||||
from tests.helpers.testmixin import TestMixin
|
||||
|
||||
|
||||
|
@ -29,7 +29,6 @@ from PyQt5 import QtCore, QtGui, QtTest, QtWidgets
|
||||
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.widgets.edits import SearchEdit, HistoryComboBox
|
||||
|
||||
from tests.helpers.testmixin import TestMixin
|
||||
|
||||
|
||||
|
@ -30,9 +30,8 @@ from PyQt5 import QtGui, QtWidgets
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.lib import ServiceItem
|
||||
from openlp.core.widgets.views import ListPreviewWidget
|
||||
|
||||
from tests.utils.osdinteraction import read_service_from_file
|
||||
from tests.helpers.testmixin import TestMixin
|
||||
from tests.utils.osdinteraction import read_service_from_file
|
||||
|
||||
|
||||
class TestListPreviewWidget(TestCase, TestMixin):
|
||||
|
@ -28,8 +28,7 @@ from unittest.mock import MagicMock, patch
|
||||
from PyQt5 import QtWidgets
|
||||
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.plugins.bibles.forms.bibleimportform import BibleImportForm, PYSWORD_AVAILABLE
|
||||
|
||||
from openlp.plugins.bibles.forms.bibleimportform import BibleImportForm
|
||||
from tests.helpers.testmixin import TestMixin
|
||||
|
||||
|
||||
|
@ -28,9 +28,8 @@ from unittest.mock import MagicMock, patch
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.common.settings import Settings
|
||||
from openlp.plugins.bibles.lib import BibleManager, LanguageSelection
|
||||
|
||||
from tests.utils.constants import TEST_RESOURCES_PATH
|
||||
from tests.helpers.testmixin import TestMixin
|
||||
from tests.utils.constants import TEST_RESOURCES_PATH
|
||||
|
||||
|
||||
class TestBibleManager(TestCase, TestMixin):
|
||||
|
@ -28,9 +28,8 @@ from unittest.mock import MagicMock, patch
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.common.settings import Settings
|
||||
from openlp.plugins.bibles.lib import BibleManager, parse_reference, LanguageSelection
|
||||
|
||||
from tests.utils.constants import TEST_RESOURCES_PATH
|
||||
from tests.helpers.testmixin import TestMixin
|
||||
from tests.utils.constants import TEST_RESOURCES_PATH
|
||||
|
||||
|
||||
class TestBibleManager(TestCase, TestMixin):
|
||||
|
@ -28,9 +28,7 @@ from unittest.mock import MagicMock, patch
|
||||
from PyQt5 import QtTest, QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.plugins.custom.lib.mediaitem import CustomMediaItem
|
||||
from openlp.plugins.custom.forms.editcustomform import EditCustomForm
|
||||
|
||||
from tests.helpers.testmixin import TestMixin
|
||||
|
||||
|
||||
|
@ -29,7 +29,6 @@ from PyQt5 import QtWidgets
|
||||
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.plugins.custom.forms.editcustomslideform import EditCustomSlideForm
|
||||
|
||||
from tests.helpers.testmixin import TestMixin
|
||||
|
||||
|
||||
|
@ -31,7 +31,6 @@ from openlp.core.common.i18n import UiStrings
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.common.settings import Settings
|
||||
from openlp.plugins.songs.forms.editsongform import EditSongForm
|
||||
|
||||
from tests.helpers.testmixin import TestMixin
|
||||
|
||||
__default_settings__ = {
|
||||
|
@ -30,7 +30,6 @@ from PyQt5 import QtCore, QtWidgets
|
||||
from openlp.core.common.i18n import UiStrings
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.plugins.songs.forms.songmaintenanceform import SongMaintenanceForm
|
||||
|
||||
from tests.helpers.testmixin import TestMixin
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user