8000 Allow to disable opening the web browser/creating PR by Jackenmen · Pull Request #36 · python/cherry-picker · GitHub
[go: up one dir, main page]

Skip to content

Allow to disable opening the web browser/creating PR #36

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 7, 2021
Merged
Changes from 1 commit
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
Prev Previous commit
Add test
  • Loading branch information
Jackenmen committed Aug 7, 2021
commit 26c5c83de332850186c6d5386578736957d756ca
12 changes: 12 additions & 0 deletions cherry_picker/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,18 @@ def test_push_to_remote_botflow(tmp_git_repo_dir, monkeypatch):
assert get_state() == WORKFLOW_STATES.PR_CREATING


def test_push_to_remote_no_auto_pr(tmp_git_repo_dir, monkeypatch):
monkeypatch.setenv("GH_AUTH", "True")
with mock.patch("cherry_picker.cherry_picker.validate_sha", return_value=True):
cherry_picker = CherryPicker("origin", "xxx", [], auto_pr=False)

with mock.patch.object(cherry_picker, "run_cmd"), mock.patch.object(
cherry_picker, "create_gh_pr"
):
cherry_picker.push_to_remote("main", "backport-branch-test")
assert get_state() == WORKFLOW_STATES.PUSHED_TO_REMOTE


def test_backport_no_branch(tmp_git_repo_dir, monkeypatch):
with mock.patch("cherry_picker.cherry_picker.validate_sha", return_value=True):
cherry_picker = CherryPicker("origin", "xxx", [])
Expand Down
0