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

This commit is contained in:
Pedro Algarvio 2013-07-14 17:19:14 +01:00
parent 89fa6cecf4
commit 716f760e80

View File

@ -556,6 +556,15 @@ class PipTestCase(TestCase):
cwd=None
)
def test_no_deps_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_deps=True)
mock.assert_called_once_with(
'pip install --no-deps pep8',
runas=None,
cwd=None
)
if __name__ == '__main__':