Example #1
0
def test_git_push_calls_expected_command_when_remote_branch_is_passed(
        mocker, mock_process):
    cmd = ['git', 'push', 'another_origin', 'another_branch']
    repo = Repository('path')
    repo.push(remote='another_origin', branch='another_branch')

    mock_process.call.assert_called_once_with(cmd, cwd=repo.path)
Example #2
0
def test_git_push_calls_expected_command_when_remote_branch_is_passed(mocker, mock_process):
    cmd = ['git', 'push', 'another_origin', 'another_branch']
    repo = Repository('path')
    repo.push(remote='another_origin', branch='another_branch')

    mock_process.call.assert_called_once_with(cmd, cwd=repo.path)
Example #3
0
def test_git_push_calls_expected_command(mocker, mock_process):
    cmd = ['git', 'push', 'origin', 'master']
    repo = Repository('path')
    repo.push()

    mock_process.call.assert_called_once_with(cmd, cwd=repo.path)
Example #4
0
def test_git_push_calls_expected_command(mocker, mock_process):
    cmd = ['git', 'push', 'origin', 'master']
    repo = Repository('path')
    repo.push()

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