Py3 compatibility fixes

This commit is contained in:
Pedro Algarvio 2014-11-22 11:41:55 +00:00
parent f13718f11c
commit 5242e7217a

View File

@ -10,6 +10,7 @@ from __future__ import absolute_import
from salt.utils import is_linux
from salttesting import TestCase, skipIf
from salttesting.helpers import ensure_in_syspath
ensure_in_syspath('../../')
# Import salt libs
try:
@ -18,7 +19,9 @@ try:
except ImportError:
HAS_SHADOW = False
ensure_in_syspath('../../')
# Import 3rd-party libs
import salt.ext.six as six
_PASSWORD = 'lamepassword'
@ -47,7 +50,7 @@ class LinuxShadowTest(TestCase):
Test shadow.gen_password
'''
self.assertTrue(HAS_SHADOW)
for algorithm, hash_info in _HASHES.iteritems():
for algorithm, hash_info in six.iteritems(_HASHES):
self.assertEqual(
shadow.gen_password(
_PASSWORD,