Py3 compatibility fixes

This commit is contained in:
Pedro Algarvio 2014-11-22 11:27:08 +00:00
parent 46add23cc1
commit fee4a62c87

View File

@ -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')
)