diff --git a/ihatemoney/tests/ihatemoney.cfg b/ihatemoney/tests/ihatemoney.cfg index 6345fcf4..648a01c4 100644 --- a/ihatemoney/tests/ihatemoney.cfg +++ b/ihatemoney/tests/ihatemoney.cfg @@ -1,3 +1,5 @@ +# This file is only used for test case "test_default_configuration_file" + DEBUG = False SQLALCHEMY_DATABASE_URI = 'sqlite:///budget.db' SQLACHEMY_ECHO = DEBUG diff --git a/ihatemoney/tests/ihatemoney_envvar.cfg b/ihatemoney/tests/ihatemoney_envvar.cfg index dbc078ee..0feec9b8 100644 --- a/ihatemoney/tests/ihatemoney_envvar.cfg +++ b/ihatemoney/tests/ihatemoney_envvar.cfg @@ -1,3 +1,5 @@ +# This file is only used for test case "test_env_var_configuration_file" + DEBUG = False SQLALCHEMY_DATABASE_URI = 'sqlite:///budget.db' SQLACHEMY_ECHO = DEBUG diff --git a/ihatemoney/tests/main_test.py b/ihatemoney/tests/main_test.py index 2aa3cf29..58475d36 100644 --- a/ihatemoney/tests/main_test.py +++ b/ihatemoney/tests/main_test.py @@ -33,7 +33,8 @@ class ConfigurationTestCase(BaseTestCase): ) def test_env_var_configuration_file(self): - """Test that settings are loaded from the specified configuration file""" + """Test that settings are loaded from a configuration file specified + with an environment variable.""" os.environ["IHATEMONEY_SETTINGS_FILE_PATH"] = os.path.join( __HERE__, "ihatemoney_envvar.cfg" ) @@ -42,6 +43,7 @@ class ConfigurationTestCase(BaseTestCase): # Test that the specified configuration file is loaded # even if the default configuration file ihatemoney.cfg exists + # in the current directory. os.environ["IHATEMONEY_SETTINGS_FILE_PATH"] = os.path.join( __HERE__, "ihatemoney_envvar.cfg" ) @@ -52,7 +54,8 @@ class ConfigurationTestCase(BaseTestCase): os.environ.pop("IHATEMONEY_SETTINGS_FILE_PATH", None) def test_default_configuration_file(self): - """Test that settings are loaded from the default configuration file""" + """Test that settings are loaded from a configuration file if one is found + in the current directory.""" self.app.config.root_path = __HERE__ load_configuration(self.app) self.assertEqual(self.app.config["SECRET_KEY"], "supersecret")