Raoul Snyman has proposed merging lp:~raoul-snyman/openlp/transifex-api into lp:openlp.
Requested reviews: OpenLP Core (openlp-core) For more details, see: https://code.launchpad.net/~raoul-snyman/openlp/transifex-api/+merge/294066 Fix Transifex API URL Add this to your merge proposal: -------------------------------- lp:~raoul-snyman/openlp/transifex-api (revision 2657) [SUCCESS] https://ci.openlp.io/job/Branch-01-Pull/1537/ [SUCCESS] https://ci.openlp.io/job/Branch-02-Functional-Tests/1448/ [FAILURE] https://ci.openlp.io/job/Branch-03-Interface-Tests/1386/ -- Your team OpenLP Core is requested to review the proposed merge of lp:~raoul-snyman/openlp/transifex-api into lp:openlp.
=== modified file 'scripts/translation_utils.py' --- scripts/translation_utils.py 2015-12-31 22:46:06 +0000 +++ scripts/translation_utils.py 2016-05-07 16:23:19 +0000 @@ -60,7 +60,7 @@ 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'] === added file 'tests/functional/openlp_core_ui/test_generaltab.py' --- tests/functional/openlp_core_ui/test_generaltab.py 1970-01-01 00:00:00 +0000 +++ tests/functional/openlp_core_ui/test_generaltab.py 2016-05-07 16:23:19 +0000 @@ -0,0 +1,57 @@ +# -*- 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(':/graphics/openlp-splash-screen.png', general_tab.logo_file, 'The logo_file should be set') + self.assertEqual('#ffffff', general_tab.logo_background_color, 'The logo background colour should be set') + self.assertEqual(mocked_screen_list, general_tab.screens) + self.assertEqual(':/icon/openlp-logo-16x16.png', general_tab.icon_path) +
_______________________________________________ Mailing list: https://launchpad.net/~openlp-core Post to : [email protected] Unsubscribe : https://launchpad.net/~openlp-core More help : https://help.launchpad.net/ListHelp

