From d03a9a8eeca21eae468a177b6c5339bf9f780c56 Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Sun, 12 May 2013 14:04:15 +0200 Subject: [PATCH] added comments --- tests/functional/openlp_core_lib/test_settings.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/functional/openlp_core_lib/test_settings.py b/tests/functional/openlp_core_lib/test_settings.py index 754d82256..714ee6fb5 100644 --- a/tests/functional/openlp_core_lib/test_settings.py +++ b/tests/functional/openlp_core_lib/test_settings.py @@ -32,14 +32,24 @@ class TestSettings(TestCase): def extend_default_settings_test(self): """ - Test the static extend_default_settings() method. + Test the static extend_default_settings() method """ + # GIVEN: + + # WHEN: Try to access not existing setting. with self.assertRaises(KeyError) as context: Settings().value(u'core/does not exist') + + # THEN: An exception should be raised. self.assertEqual(context.exception[0], u'core/does not exist') + # GIVEN: Extended setting. Settings.extend_default_settings({u'core/does exist': True}) + + # WHEN: Try to access it. value = Settings().value(u'core/does exist') + + # THEN: The correct value should be returned. assert value and isinstance(value, bool)