1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00
pip/tests/test_vcs_subversion.py

14 lines
574 B
Python
Raw Normal View History

from mock import patch
from pip.vcs.subversion import Subversion
from tests.test_pip import reset_env
@patch('pip.vcs.subversion.call_subprocess')
def test_svn_should_recognize_auth_info_in_url(call_subprocess_mock):
env = reset_env()
svn = Subversion(url='svn+http://username:password@svn.example.com/')
svn.obtain(env.scratch_path/'test')
call_subprocess_mock.assert_called_with([
svn.cmd, 'checkout', '-q', '--username', 'username', '--password',
'password', 'http://username:password@svn.example.com/',
env.scratch_path/'test'])