mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix linter
This commit is contained in:
parent
5e2db2f7af
commit
484bab4399
1 changed files with 2 additions and 0 deletions
|
@ -289,10 +289,12 @@ class SaltmodTestCase(TestCase, LoaderModuleMockMixin):
|
|||
origcmd = saltmod.__salt__['saltutil.cmd']
|
||||
cmd_kwargs = {}
|
||||
cmd_args = []
|
||||
|
||||
def cmd_mock(*args, **kwargs):
|
||||
cmd_args.extend(args)
|
||||
cmd_kwargs.update(kwargs)
|
||||
return origcmd(*args, **kwargs)
|
||||
|
||||
with patch.dict(saltmod.__salt__, {'saltutil.cmd': cmd_mock}):
|
||||
ret = saltmod.state('state.sls', tgt='*', ssh=True, highstate=True, roster='my_roster')
|
||||
assert 'roster_file' in cmd_kwargs
|
||||
|
|
Loading…
Add table
Reference in a new issue