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

29 lines
1 KiB
Python
Raw Normal View History

2015-01-15 00:53:15 +01:00
import pytest
from mock import patch
from pip._internal.vcs.subversion import Subversion
@patch('pip._internal.vcs.call_subprocess')
2015-01-15 00:53:15 +01:00
@pytest.mark.network
def test_obtain_should_recognize_auth_info_url(call_subprocess_mock, script):
svn = Subversion(url='svn+http://username:password@svn.example.com/')
svn.obtain(script.scratch_path / 'test')
assert call_subprocess_mock.call_args[0][0] == [
svn.name, 'checkout', '-q', '--username', 'username', '--password',
'password', 'http://svn.example.com/',
script.scratch_path / 'test',
]
@patch('pip._internal.vcs.call_subprocess')
2015-01-15 00:53:15 +01:00
@pytest.mark.network
def test_export_should_recognize_auth_info_url(call_subprocess_mock, script):
svn = Subversion(url='svn+http://username:password@svn.example.com/')
svn.export(script.scratch_path / 'test')
assert call_subprocess_mock.call_args[0][0] == [
svn.name, 'export', '--username', 'username', '--password',
'password', 'http://svn.example.com/',
script.scratch_path / 'test',
]