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
Paul Nasrat 7ede43ac26 Make pep8 clean again.
Incorrect blank lines E302 and E303.
2012-05-13 20:13:50 -07:00

24 lines
1 KiB
Python

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_obtain_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'])
@patch('pip.vcs.subversion.call_subprocess')
def test_export_should_recognize_auth_info_in_url(call_subprocess_mock):
env = reset_env()
svn = Subversion(url='svn+http://username:password@svn.example.com/')
svn.export(env.scratch_path/'test')
assert call_subprocess_mock.call_args[0] == ([
svn.cmd, 'export', '--username', 'username', '--password', 'password',
'http://username:password@svn.example.com/', env.scratch_path/'test'],)