diff options
author | John L. Villalovos <john@sodarock.com> | 2021-12-19 15:13:43 -0800 |
---|---|---|
committer | John L. Villalovos <john@sodarock.com> | 2021-12-19 15:13:43 -0800 |
commit | c80b3b75aff53ae228ec05ddf1c1e61d91762846 (patch) | |
tree | bce75bba9c4e7711c490e718f17e4d15e8f99b82 | |
parent | 3ee061c270de3e3becbcaccaed20ffeba833808e (diff) | |
download | gitlab-jlvillal/unit_test_config.tar.gz |
chore: fix unit test if config file exists locallyjlvillal/unit_test_config
Closes #1764
-rw-r--r-- | tests/unit/test_config.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/unit/test_config.py b/tests/unit/test_config.py index c589564..6874e94 100644 --- a/tests/unit/test_config.py +++ b/tests/unit/test_config.py @@ -126,8 +126,10 @@ def test_env_config_missing_file_raises(monkeypatch): config._get_config_files() -def test_env_config_not_defined_does_not_raise(mock_clean_env): - assert config._get_config_files() == [] +def test_env_config_not_defined_does_not_raise(mock_clean_env, monkeypatch): + with monkeypatch.context() as m: + m.setattr(config, "_DEFAULT_FILES", []) + assert config._get_config_files() == [] def test_default_config(mock_clean_env, monkeypatch): |