Merge lp:~raoul-snyman/openlp/transifex-api-2.4 into lp:openlp/2.4

Proposed by Raoul Snyman
Status: Merged
Merged at revision: 2632
Proposed branch: lp:~raoul-snyman/openlp/transifex-api-2.4
Merge into: lp:openlp/2.4
Diff against target: 72 lines (+56/-1)
2 files modified
scripts/translation_utils.py (+1/-1)
tests/functional/openlp_core_ui/test_generaltab.py (+55/-0)
To merge this branch: bzr merge lp:~raoul-snyman/openlp/transifex-api-2.4
Reviewer Review Type Date Requested Status
Tim Bentley Approve
Review via email: mp+294065@code.launchpad.net

Description of the change

Fix the Transifex API URL

Add this to your merge proposal:
--------------------------------
lp:~raoul-snyman/openlp/transifex-api-2.4 (revision 2632)
[SUCCESS] https://ci.openlp.io/job/Branch-01-Pull/1536/
[SUCCESS] https://ci.openlp.io/job/Branch-02-Functional-Tests/1447/
[FAILURE] https://ci.openlp.io/job/Branch-03-Interface-Tests/1385/

To post a comment you must log in.
Revision history for this message
Tim Bentley (trb143) wrote :

Looks good

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'scripts/translation_utils.py'
2--- scripts/translation_utils.py 2015-12-31 22:46:06 +0000
3+++ scripts/translation_utils.py 2016-05-07 16:20:08 +0000
4@@ -60,7 +60,7 @@
5 from PyQt5 import QtCore
6 from lxml import etree, objectify
7
8-SERVER_URL = 'http://www.transifex.net/api/2/project/openlp/resource/openlp-24x/'
9+SERVER_URL = 'http://www.transifex.com/api/2/project/openlp/resource/openlp-24x/'
10 IGNORED_PATHS = ['scripts']
11 IGNORED_FILES = ['setup.py']
12
13
14=== added file 'tests/functional/openlp_core_ui/test_generaltab.py'
15--- tests/functional/openlp_core_ui/test_generaltab.py 1970-01-01 00:00:00 +0000
16+++ tests/functional/openlp_core_ui/test_generaltab.py 2016-05-07 16:20:08 +0000
17@@ -0,0 +1,55 @@
18+# -*- coding: utf-8 -*-
19+# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
20+# pylint: disable=invalid-name
21+
22+###############################################################################
23+# OpenLP - Open Source Lyrics Projection #
24+# --------------------------------------------------------------------------- #
25+# Copyright (c) 2008-2016 OpenLP Developers #
26+# --------------------------------------------------------------------------- #
27+# This program is free software; you can redistribute it and/or modify it #
28+# under the terms of the GNU General Public License as published by the Free #
29+# Software Foundation; version 2 of the License. #
30+# #
31+# This program is distributed in the hope that it will be useful, but WITHOUT #
32+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
33+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
34+# more details. #
35+# #
36+# You should have received a copy of the GNU General Public License along #
37+# with this program; if not, write to the Free Software Foundation, Inc., 59 #
38+# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
39+###############################################################################
40+"""
41+Package to test the openlp.core.ui.general package.
42+"""
43+from unittest import TestCase
44+
45+from openlp.core.ui.generaltab import GeneralTab
46+
47+from tests.functional import MagicMock, patch
48+
49+
50+class TestGeneralTab(TestCase):
51+ """
52+ Test the General tab
53+ """
54+
55+ @patch('openlp.core.ui.generaltab.translate')
56+ @patch('openlp.core.ui.generaltab.ScreenList')
57+ def create_general_tab_test(self, MockedScreenList, mocked_translate):
58+ """
59+ Test that the General tab has the correct settings when created
60+ """
61+ # GIVEN: A GeneralTab class and a mocked out ScreenList
62+ mocked_screen_list = MagicMock()
63+ MockedScreenList.return_value = mocked_screen_list
64+ mocked_translate.side_effect = lambda x, y: y
65+
66+ # WHEN: An instance of the class is created
67+ general_tab = GeneralTab(None)
68+
69+ # THEN: Various member variables should be initialised
70+ self.assertEqual(mocked_screen_list, general_tab.screens)
71+ self.assertEqual(':/icon/openlp-logo-16x16.png', general_tab.icon_path)
72+

Subscribers

People subscribed via source and target branches

to all changes: