From 3115eaa04ee83e2f7b429340dbe018c9d362a2bd Mon Sep 17 00:00:00 2001 From: TheNetworkGuy Date: Thu, 12 Jun 2025 11:14:15 +0000 Subject: [PATCH] Fixed linter and test for config file --- modules/config.py | 2 +- tests/test_configuration_parsing.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/config.py b/modules/config.py index 4a44aab..9f97c83 100644 --- a/modules/config.py +++ b/modules/config.py @@ -118,4 +118,4 @@ def load_config_file(config_default, config_file="config.py"): if hasattr(config_module, key): dconf[key] = getattr(config_module, key) return dconf - return config_default \ No newline at end of file + return config_default diff --git a/tests/test_configuration_parsing.py b/tests/test_configuration_parsing.py index 23438b4..641b508 100644 --- a/tests/test_configuration_parsing.py +++ b/tests/test_configuration_parsing.py @@ -93,11 +93,10 @@ def test_load_config_file_function(): def test_load_config_file_not_found(): """Test load_config_file when the config file doesn't exist""" - # Instead of trying to assert on the logger call, we'll just check the return value - # and verify the function works as expected in this case with patch('pathlib.Path.exists', return_value=False): result = load_config_file(DEFAULT_CONFIG.copy()) - assert result is None + # Should return a dict equal to DEFAULT_CONFIG, not a new object + assert result == DEFAULT_CONFIG def test_load_env_variable_function():