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

chore: fix functional test failure if config present#1792

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
nejch merged 1 commit intomainfromjlvillal/cli_test
Jan 2, 2022
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletionstests/functional/cli/test_cli.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,7 +3,7 @@
import pytest
import responses

from gitlab import __version__
from gitlab import __version__, config


@pytest.fixture
Expand All@@ -30,9 +30,13 @@ def test_version(script_runner):


@pytest.mark.script_launch_mode("inprocess")
def test_defaults_to_gitlab_com(script_runner, resp_get_project):
# Runs in-process to intercept requests to gitlab.com
ret = script_runner.run("gitlab", "project", "get", "--id", "1")
def test_defaults_to_gitlab_com(script_runner, resp_get_project, monkeypatch):
with monkeypatch.context() as m:
# Ensure we don't pick up any config files that may already exist in the local
# environment.
m.setattr(config, "_DEFAULT_FILES", [])
# Runs in-process to intercept requests to gitlab.com
ret = script_runner.run("gitlab", "project", "get", "--id", "1")
assert ret.success
assert "id: 1" in ret.stdout

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp