Ejemplo n.º 1
0
def test_git_pull_rebase_calls_expected_command_when_remote_branch_is_passed(
        mocker, mock_process):
    cmd = ['git', 'pull', '--rebase', 'another_origin', 'another_branch']
    repo = Repository('path')
    repo.pull_rebase(remote='another_origin', branch='another_branch')

    mock_process.call.assert_called_once_with(cmd, cwd=repo.path)
Ejemplo n.º 2
0
def test_git_pull_rebase_calls_expected_command_when_remote_branch_is_passed(mocker, mock_process):
    cmd = ['git', 'pull', '--rebase', 'another_origin', 'another_branch']
    repo = Repository('path')
    repo.pull_rebase(remote='another_origin', branch='another_branch')

    mock_process.call.assert_called_once_with(cmd, cwd=repo.path)
Ejemplo n.º 3
0
def test_git_pull_rebase_calls_expected_command(mocker, mock_process):
    cmd = ['git', 'pull', '--rebase', 'origin', 'master']
    repo = Repository('path')
    repo.pull_rebase()

    mock_process.call.assert_called_once_with(cmd, cwd=repo.path)
Ejemplo n.º 4
0
def test_git_pull_rebase_calls_expected_command(mocker, mock_process):
    cmd = ['git', 'pull', '--rebase', 'origin', 'master']
    repo = Repository('path')
    repo.pull_rebase()

    mock_process.call.assert_called_once_with(cmd, cwd=repo.path)