Skip to content

Commit

Permalink
Merge pull request #1765 from python-gitlab/jlvillal/unit_test_config
Browse files Browse the repository at this point in the history
chore: fix unit test if config file exists locally
  • Loading branch information
nejch committed Dec 20, 2021
2 parents fed613f + c80b3b7 commit ccefe80
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/unit/test_config.py
Expand Up @@ -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):
Expand Down

0 comments on commit ccefe80

Please sign in to comment.