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
f13718f11c
commit
5242e7217a
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user