Fix the tests

This commit is contained in:
Raoul Snyman 2018-10-26 18:53:43 -07:00
parent d1c4cea777
commit 417912aae2
6 changed files with 11 additions and 8 deletions

View File

@ -173,9 +173,9 @@ class UiIcons(object):
setattr(self, key, qta.icon(icon))
except Exception:
import sys
log.error("Unexpected error: %s" % sys.exc_info())
log.error('Unexpected error: %s' % sys.exc_info())
setattr(self, key, qta.icon('fa.plus-circle', color='red'))
except KeyError:
except Exception:
setattr(self, key, qta.icon('fa.plus-circle', color='red'))
self.main_icon = build_icon(':/icon/openlp-logo.svg')

View File

@ -57,7 +57,7 @@ from openlp.core.ui.pluginform import PluginForm
from openlp.core.ui.slidecontroller import LiveController, PreviewController
from openlp.core.ui.settingsform import SettingsForm
from openlp.core.ui.firsttimeform import FirstTimeForm
from openlp.core.ui.media import MediaController
from openlp.core.ui.media.mediacontroller 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

View File

@ -34,7 +34,7 @@ from openlp.core.projectors.tab import ProjectorTab
from openlp.core.ui.advancedtab import AdvancedTab
from openlp.core.ui.generaltab import GeneralTab
from openlp.core.ui.themestab import ThemesTab
from openlp.core.ui.media import PlayerTab
from openlp.core.ui.media.playertab import PlayerTab
from openlp.core.ui.settingsdialog import Ui_SettingsDialog
log = logging.getLogger(__name__)

View File

@ -35,8 +35,9 @@ from openlp.core.lib.ui import create_action
from openlp.core.ui import AlertLocation
from openlp.core.ui.icons import UiIcons
from openlp.plugins.alerts.endpoint import api_alerts_endpoint, alerts_endpoint
from openlp.plugins.alerts.forms import AlertForm
from openlp.plugins.alerts.lib import AlertsManager, AlertsTab
from openlp.plugins.alerts.forms.alertform import AlertForm
from openlp.plugins.alerts.lib.alertsmanager import AlertsManager
from openlp.plugins.alerts.lib.alertstab import AlertsTab
from openlp.plugins.alerts.lib.db import init_schema
log = logging.getLogger(__name__)

View File

@ -36,7 +36,8 @@ from openlp.core.common.path import Path
from openlp.core.lib import build_icon
from openlp.core.lib.plugin import Plugin, StringContent
from openlp.plugins.media.endpoint import api_media_endpoint, media_endpoint
from openlp.plugins.media.lib import MediaMediaItem, MediaTab
from openlp.plugins.media.lib.mediaitem import MediaMediaItem
from openlp.plugins.media.lib.mediatab import MediaTab
log = logging.getLogger(__name__)

View File

@ -26,8 +26,9 @@ import os
from unittest import TestCase
from unittest.mock import MagicMock
from openlp.core.api.http import register_endpoint, application, NotFound
from openlp.core.api.http import register_endpoint, application
from openlp.core.api.http.endpoint import Endpoint
from openlp.core.api.http.errors import NotFound
ROOT_DIR = os.path.dirname(os.path.realpath(__file__))