mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Py3 compatibility fixes
This commit is contained in:
parent
46add23cc1
commit
fee4a62c87
@ -18,6 +18,9 @@ import salt.loader
|
||||
import salt.config
|
||||
import integration
|
||||
|
||||
# Import 3rd-party libs
|
||||
import salt.ext.six as six
|
||||
|
||||
|
||||
REQUISITES = ['require', 'require_in', 'use', 'use_in', 'watch', 'watch_in']
|
||||
|
||||
@ -235,7 +238,7 @@ B:
|
||||
|
||||
reqs = result['test.goalstate::goal']['stateconf.set'][0]['require']
|
||||
self.assertEqual(
|
||||
set([i.itervalues().next() for i in reqs]), set('ABCDE')
|
||||
set([next(six.itervalues(i)) for i in reqs]), set('ABCDE')
|
||||
)
|
||||
|
||||
def test_implicit_require_with_goal_state(self):
|
||||
@ -289,7 +292,7 @@ G:
|
||||
goal_args = result['test::goal']['stateconf.set']
|
||||
self.assertEqual(len(goal_args), 1)
|
||||
self.assertEqual(
|
||||
[i.itervalues().next() for i in goal_args[0]['require']],
|
||||
[next(six.itervalues(i)) for i in goal_args[0]['require']],
|
||||
list('ABCDEFG')
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user