mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix unit test: wrong error types in side effect
This commit is contained in:
parent
d9359bca13
commit
67034139d9
1 changed files with 3 additions and 7 deletions
|
@ -857,14 +857,10 @@ class StateTestCase(TestCase, LoaderModuleMockMixin):
|
|||
True),
|
||||
["A"])
|
||||
|
||||
mock = MagicMock(side_effect=[False,
|
||||
True,
|
||||
True,
|
||||
True,
|
||||
True])
|
||||
with patch.object(state, '_check_pillar', mock):
|
||||
mock = MagicMock(side_effect=[['E', '1'], None, None, None, None])
|
||||
with patch.object(state, '_get_pillar_errors', mock):
|
||||
with patch.dict(state.__context__, {"retcode": 5}):
|
||||
with patch.dict(state.__pillar__, {"_errors": "E1"}):
|
||||
with patch.dict(state.__pillar__, {"_errors": ['E', '1']}):
|
||||
self.assertListEqual(state.sls("core,edit.vim dev",
|
||||
None,
|
||||
None,
|
||||
|
|
Loading…
Add table
Reference in a new issue