forked from openlp/openlp
Merge 2.4.x trunk
This commit is contained in:
commit
d5c9fd33c5
@ -153,10 +153,10 @@ class OpenLP(OpenLPMixin, QtWidgets.QApplication):
|
||||
self.processEvents()
|
||||
if not has_run_wizard:
|
||||
self.main_window.first_time()
|
||||
# update_check = Settings().value('core/update check')
|
||||
# if update_check:
|
||||
# version = VersionThread(self.main_window)
|
||||
# version.start()
|
||||
update_check = Settings().value('core/update check')
|
||||
if update_check:
|
||||
version = VersionThread(self.main_window)
|
||||
version.start()
|
||||
self.main_window.is_display_blank()
|
||||
self.main_window.app_startup()
|
||||
return self.exec()
|
||||
|
@ -60,7 +60,7 @@ import webbrowser
|
||||
from PyQt5 import QtCore
|
||||
from lxml import etree, objectify
|
||||
|
||||
SERVER_URL = 'http://www.transifex.net/api/2/project/openlp/resource/openlp-24x/'
|
||||
SERVER_URL = 'http://www.transifex.com/api/2/project/openlp/resource/openlp-24x/'
|
||||
IGNORED_PATHS = ['scripts']
|
||||
IGNORED_FILES = ['setup.py']
|
||||
|
||||
|
55
tests/functional/openlp_core_ui/test_generaltab.py
Normal file
55
tests/functional/openlp_core_ui/test_generaltab.py
Normal file
@ -0,0 +1,55 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
|
||||
# pylint: disable=invalid-name
|
||||
|
||||
###############################################################################
|
||||
# OpenLP - Open Source Lyrics Projection #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2016 OpenLP Developers #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
# Software Foundation; version 2 of the License. #
|
||||
# #
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
||||
# more details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License along #
|
||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||
###############################################################################
|
||||
"""
|
||||
Package to test the openlp.core.ui.general package.
|
||||
"""
|
||||
from unittest import TestCase
|
||||
|
||||
from openlp.core.ui.generaltab import GeneralTab
|
||||
|
||||
from tests.functional import MagicMock, patch
|
||||
|
||||
|
||||
class TestGeneralTab(TestCase):
|
||||
"""
|
||||
Test the General tab
|
||||
"""
|
||||
|
||||
@patch('openlp.core.ui.generaltab.translate')
|
||||
@patch('openlp.core.ui.generaltab.ScreenList')
|
||||
def create_general_tab_test(self, MockedScreenList, mocked_translate):
|
||||
"""
|
||||
Test that the General tab has the correct settings when created
|
||||
"""
|
||||
# GIVEN: A GeneralTab class and a mocked out ScreenList
|
||||
mocked_screen_list = MagicMock()
|
||||
MockedScreenList.return_value = mocked_screen_list
|
||||
mocked_translate.side_effect = lambda x, y: y
|
||||
|
||||
# WHEN: An instance of the class is created
|
||||
general_tab = GeneralTab(None)
|
||||
|
||||
# THEN: Various member variables should be initialised
|
||||
self.assertEqual(mocked_screen_list, general_tab.screens)
|
||||
self.assertEqual(':/icon/openlp-logo-16x16.png', general_tab.icon_path)
|
||||
|
Loading…
Reference in New Issue
Block a user