From a75953c3d8c7d94e3c5c4453f2536ccfa81b7b99 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Fri, 29 Apr 2016 22:52:37 +0200 Subject: [PATCH] Add a test --- .../openlp_core_ui/test_firsttimeform.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/functional/openlp_core_ui/test_firsttimeform.py b/tests/functional/openlp_core_ui/test_firsttimeform.py index 8b9a0f8b5..08854acdb 100644 --- a/tests/functional/openlp_core_ui/test_firsttimeform.py +++ b/tests/functional/openlp_core_ui/test_firsttimeform.py @@ -78,6 +78,23 @@ class TestFirstTimeForm(TestCase, TestMixin): if os.path.isfile(self.tempfile): os.remove(self.tempfile) + @patch('openlp.core.ui.firsttimewizard.is_macosx') + def constructor_macosx_test(self, mocked_is_macosx): + """ + Test that the form is resized correctly on OS X + """ + # GIVEN: The platform is OS X + mocked_is_macosx.return_value = True + + # WHEN: The wizard is created + frw = FirstTimeForm(None) + + # THEN: The form should have been resized + size = frw.size() + self.assertEqual(634, size.width()) + self.assertEqual(386, size.height()) + + def initialise_test(self): """ Test if we can intialise the FirstTimeForm