Merge lp:~raoul-snyman/openlp/bug-1668669 into lp:openlp

Proposed by Raoul Snyman
Status: Merged
Merged at revision: 2724
Proposed branch: lp:~raoul-snyman/openlp/bug-1668669
Merge into: lp:openlp
Diff against target: 34 lines (+15/-1)
2 files modified
openlp/core/ui/settingsdialog.py (+1/-1)
tests/functional/openlp_core_ui/test_settingsform.py (+14/-0)
To merge this branch: bzr merge lp:~raoul-snyman/openlp/bug-1668669
Reviewer Review Type Date Requested Status
Tim Bentley Approve
Review via email: mp+318698@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Tim Bentley (trb143) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'openlp/core/ui/settingsdialog.py'
2--- openlp/core/ui/settingsdialog.py 2016-12-31 11:01:36 +0000
3+++ openlp/core/ui/settingsdialog.py 2017-03-02 00:27:23 +0000
4@@ -39,7 +39,7 @@
5 """
6 settings_dialog.setObjectName('settings_dialog')
7 settings_dialog.setWindowIcon(build_icon(':/icon/openlp-logo.svg'))
8- settings_dialog.resize(800, 700)
9+ settings_dialog.resize(920, 625)
10 self.dialog_layout = QtWidgets.QGridLayout(settings_dialog)
11 self.dialog_layout.setObjectName('dialog_layout')
12 self.dialog_layout.setContentsMargins(8, 8, 8, 8)
13
14=== modified file 'tests/functional/openlp_core_ui/test_settingsform.py'
15--- tests/functional/openlp_core_ui/test_settingsform.py 2016-12-31 11:01:36 +0000
16+++ tests/functional/openlp_core_ui/test_settingsform.py 2017-03-02 00:27:23 +0000
17@@ -151,3 +151,17 @@
18 # THEN: The general tab's cancel() method should have been called, but not the themes tab
19 mocked_general_cancel.assert_called_with()
20 self.assertEqual(0, mocked_theme_cancel.call_count, 'The Themes tab\'s cancel() should not have been called')
21+
22+ def test_register_post_process(self):
23+ """
24+ Test that the register_post_process() method works correctly
25+ """
26+ # GIVEN: A settings form instance
27+ settings_form = SettingsForm(None)
28+ fake_function = MagicMock()
29+
30+ # WHEN: register_post_process() is called
31+ settings_form.register_post_process(fake_function)
32+
33+ # THEN: The fake function should be in the settings form's list
34+ assert fake_function in settings_form.processes