Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc9ed3dd

Browse files
chore: fix functional test failure if config present
Previouslyc8256a5 was done to fixthis but it missed two other failures.
1 parentd45b59e commitc9ed3dd

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

‎tests/functional/cli/test_cli.py‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,8 @@ def test_version(script_runner):
4242
@responses.activate
4343
deftest_defaults_to_gitlab_com(script_runner,resp_get_project,monkeypatch):
4444
responses.add(**resp_get_project)
45-
withmonkeypatch.context()asm:
46-
# Ensure we don't pick up any config files that may already exist in the local
47-
# environment.
48-
m.setattr(config,"_DEFAULT_FILES", [])
49-
ret=script_runner.run("gitlab","project","get","--id","1")
45+
monkeypatch.setattr(config,"_DEFAULT_FILES", [])
46+
ret=script_runner.run("gitlab","project","get","--id","1")
5047
assertret.success
5148
assert"id: 1"inret.stdout
5249

@@ -55,6 +52,7 @@ def test_defaults_to_gitlab_com(script_runner, resp_get_project, monkeypatch):
5552
@responses.activate
5653
deftest_uses_ci_server_url(monkeypatch,script_runner,resp_get_project):
5754
monkeypatch.setenv("CI_SERVER_URL",CI_SERVER_URL)
55+
monkeypatch.setattr(config,"_DEFAULT_FILES", [])
5856
resp_get_project_in_ci=copy.deepcopy(resp_get_project)
5957
resp_get_project_in_ci.update(url=f"{CI_SERVER_URL}/api/v4/projects/1")
6058

@@ -67,6 +65,7 @@ def test_uses_ci_server_url(monkeypatch, script_runner, resp_get_project):
6765
@responses.activate
6866
deftest_uses_ci_job_token(monkeypatch,script_runner,resp_get_project):
6967
monkeypatch.setenv("CI_JOB_TOKEN",CI_JOB_TOKEN)
68+
monkeypatch.setattr(config,"_DEFAULT_FILES", [])
7069
resp_get_project_in_ci=copy.deepcopy(resp_get_project)
7170
resp_get_project_in_ci.update(
7271
match=[responses.matchers.header_matcher({"JOB-TOKEN":CI_JOB_TOKEN})],

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp