mirror of
https://github.com/TheNetworkGuy/netbox-zabbix-sync.git
synced 2025-07-13 23:27:32 -06:00
Fixed linter and test for config file
This commit is contained in:
parent
c8fda04ce8
commit
3115eaa04e
@ -93,11 +93,10 @@ def test_load_config_file_function():
|
|||||||
|
|
||||||
def test_load_config_file_not_found():
|
def test_load_config_file_not_found():
|
||||||
"""Test load_config_file when the config file doesn't exist"""
|
"""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):
|
with patch('pathlib.Path.exists', return_value=False):
|
||||||
result = load_config_file(DEFAULT_CONFIG.copy())
|
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():
|
def test_load_env_variable_function():
|
||||||
|
Loading…
Reference in New Issue
Block a user