Added a mocked test case for --no-download passing to pip install.

This commit is contained in:
Pedro Algarvio 2013-07-14 16:36:26 +01:00
parent 60ef910bad
commit 85b0d7964d

View File

@ -395,6 +395,16 @@ class PipTestCase(TestCase):
cwd=None
)
def test_no_download_argument_in_resulting_command(self):
mock = MagicMock(return_value={'retcode': 0, 'stdout': ''})
with patch.dict(pip.__salt__, {'cmd.run_all': mock}):
pip.install('pep8', no_download=True)
mock.assert_called_once_with(
'pip install --no-download pep8',
runas=None,
cwd=None
)
def test_download_cache_argument_in_resulting_command(self):
mock = MagicMock(return_value={'retcode': 0, 'stdout': ''})
with patch.dict(pip.__salt__, {'cmd.run_all': mock}):