mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Added a mocked test case for --no-deps
passing to pip install
.
This commit is contained in:
parent
89fa6cecf4
commit
716f760e80
@ -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__':
|
||||
|
Loading…
Reference in New Issue
Block a user