def test_git_constructs_commands_with_options(command, expected): run = mock_run() _git._git('path', command, run=run) run.assert_called_once_with('path', expected)
def test_git_raises_giterror(): run = mock_run(returncode=1) with raises(GitError): _git._git('path', ['foo', 'bar'], run=run)