summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNejc Habjan <hab.nejc@gmail.com>2021-12-20 22:51:35 +0100
committerGitHub <noreply@github.com>2021-12-20 22:51:35 +0100
commitccefe80f150eb50176e52b8c9f5b4d0bdb4f5b43 (patch)
treedac66bb24566cbb10dda6611650b14ef96361419
parentfed613f41a298e79a975b7f99203e07e0f45e62c (diff)
parentc80b3b75aff53ae228ec05ddf1c1e61d91762846 (diff)
downloadgitlab-ccefe80f150eb50176e52b8c9f5b4d0bdb4f5b43.tar.gz
Merge pull request #1765 from python-gitlab/jlvillal/unit_test_config
chore: fix unit test if config file exists locally
-rw-r--r--tests/unit/test_config.py6
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):