mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Test if --pre
option argument ends up in the resulting command line for pip.install
.
This commit is contained in:
parent
b8dc7f35a4
commit
98c63b9671
@ -843,6 +843,18 @@ class PipTestCase(TestCase):
|
||||
}
|
||||
)
|
||||
|
||||
def test_install_pre_argument_in_resulting_command(self):
|
||||
mock = MagicMock(return_value={'retcode': 0, 'stdout': ''})
|
||||
with patch.dict(pip.__salt__, {'cmd.run_all': mock}):
|
||||
pip.install(
|
||||
'pep8', pre_releases=True
|
||||
)
|
||||
mock.assert_called_once_with(
|
||||
'pip install --pre pep8',
|
||||
runas=None,
|
||||
cwd=None
|
||||
)
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
Loading…
Reference in New Issue
Block a user