mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Bugfix: unit test mistakenly expects pillar errors as a string, while it is a list
This commit is contained in:
parent
8c2bdc696b
commit
d9359bca13
1 changed files with 3 additions and 3 deletions
|
@ -698,9 +698,9 @@ class StateTestCase(TestCase, LoaderModuleMockMixin):
|
|||
with patch.object(state, '_check_queue', mock):
|
||||
self.assertEqual(state.top("reverse_top.sls"), "A")
|
||||
|
||||
mock = MagicMock(side_effect=[False, True, True])
|
||||
with patch.object(state, '_check_pillar', mock):
|
||||
with patch.dict(state.__pillar__, {"_errors": "E"}):
|
||||
mock = MagicMock(side_effect=[['E'], None, None])
|
||||
with patch.object(state, '_get_pillar_errors', mock):
|
||||
with patch.dict(state.__pillar__, {"_errors": ['E']}):
|
||||
self.assertListEqual(state.top("reverse_top.sls"), ret)
|
||||
|
||||
with patch.dict(state.__opts__, {"test": "A"}):
|
||||
|
|
Loading…
Add table
Reference in a new issue