File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 2020import logging
2121import pickle
2222from http .client import HTTPConnection
23+ from typing import List , Optional , Union
2324
2425import pytest
2526import responses
@@ -300,7 +301,11 @@ def test_gitlab_from_config(default_config):
300301 gitlab .Gitlab .from_config ("one" , [config_path ])
301302
302303
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 )
304309 with pytest .raises (GitlabConfigMissingError , match = "non-existing" ):
305310 gitlab .Gitlab .from_config ("non-existing" )
306311
You can’t perform that action at this time.
0 commit comments