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():