| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -20,6 +20,7 @@ | |||
| 20 | 20 | import logging | |
| 21 | 21 | import pickle | |
| 22 | 22 | from http.client import HTTPConnection | |
| 23 | + from typing import List, Optional, Union | ||
| 23 | 24 | ||
| 24 | 25 | import pytest | |
| 25 | 26 | import responses | |
@@ -300,7 +301,11 @@ def test_gitlab_from_config(default_config): | |||
| 300 | 301 | gitlab.Gitlab.from_config("one", [config_path]) | |
| 301 | 302 | ||
| 302 | 303 | ||
| 303 | - def test_gitlab_from_config_without_files_raises(): | ||
| 304 | + def test_gitlab_from_config_without_files_raises(monkeypatch): | ||
| 305 | + def no_files(config_files: Optional[List[str]] = None) -> Union[str, List[str]]: | ||
| 306 | + return [] | ||
| 307 | + | ||
| 308 | + monkeypatch.setattr(gitlab.config, "_get_config_files", no_files) | ||
| 304 | 309 | with pytest.raises(GitlabConfigMissingError, match="non-existing"): | |
| 305 | 310 | gitlab.Gitlab.from_config("non-existing") | |
| 306 | 311 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments