summaryrefslogtreecommitdiff
path: root/tests/functional
diff options
context:
space:
mode:
authorjohnthagen <johnthagen@gmail.com>2019-05-20 12:45:19 -0400
committerjohnthagen <johnthagen@gmail.com>2019-05-20 12:45:19 -0400
commit3cab748c6ed088561f4a3161fb5c5fdda37153a7 (patch)
treefb99e2f9d375e0145f353cfc088ee36dec0c5613 /tests/functional
parent9c854365734ab8251fc8db0485933819f65a24e1 (diff)
downloadpip-3cab748c6ed088561f4a3161fb5c5fdda37153a7.tar.gz
Set use_interactive=False to avoid having to mock
Diffstat (limited to 'tests/functional')
-rw-r--r--tests/functional/test_install_vcs_svn.py22
1 files changed, 8 insertions, 14 deletions
diff --git a/tests/functional/test_install_vcs_svn.py b/tests/functional/test_install_vcs_svn.py
index 5e64bab07..2c47a71fa 100644
--- a/tests/functional/test_install_vcs_svn.py
+++ b/tests/functional/test_install_vcs_svn.py
@@ -4,33 +4,27 @@ from mock import patch
from pip._internal.vcs.subversion import Subversion
-@patch('pip._internal.vcs.subversion.Subversion.get_remote_call_options')
@patch('pip._internal.vcs.call_subprocess')
@pytest.mark.network
-def test_obtain_should_recognize_auth_info_url(
- call_subprocess_mock, get_remote_call_options_mock, script):
- get_remote_call_options_mock.return_value = []
+def test_obtain_should_recognize_auth_info_url(call_subprocess_mock, script):
url = 'svn+http://username:password@svn.example.com/'
- svn = Subversion()
+ svn = Subversion(use_interactive=False)
svn.obtain(script.scratch_path / 'test', url=url)
assert call_subprocess_mock.call_args[0][0] == [
- svn.name, 'checkout', '-q', '--username', 'username', '--password',
- 'password', 'http://svn.example.com/',
+ svn.name, 'checkout', '-q', '--non-interactive', '--username',
+ 'username', '--password', 'password', 'http://svn.example.com/',
script.scratch_path / 'test',
]
-@patch('pip._internal.vcs.subversion.Subversion.get_remote_call_options')
@patch('pip._internal.vcs.call_subprocess')
@pytest.mark.network
-def test_export_should_recognize_auth_info_url(
- call_subprocess_mock, get_remote_call_options_mock, script):
- get_remote_call_options_mock.return_value = []
+def test_export_should_recognize_auth_info_url(call_subprocess_mock, script):
url = 'svn+http://username:password@svn.example.com/'
- svn = Subversion()
+ svn = Subversion(use_interactive=False)
svn.export(script.scratch_path / 'test', url=url)
assert call_subprocess_mock.call_args[0][0] == [
- svn.name, 'export', '--username', 'username', '--password',
- 'password', 'http://svn.example.com/',
+ svn.name, 'export', '--non-interactive', '--username', 'username',
+ '--password', 'password', 'http://svn.example.com/',
script.scratch_path / 'test',
]