mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Py3 compatibility fixes
This commit is contained in:
parent
cb6531293c
commit
8fa37d65eb
1 changed files with 7 additions and 2 deletions
|
@ -22,6 +22,9 @@ ensure_in_syspath('../../')
|
|||
import integration
|
||||
import salt.utils
|
||||
|
||||
# Import 3rd-party libs
|
||||
import salt.ext.six as six
|
||||
|
||||
|
||||
class CopyTest(integration.ShellCase, integration.ShellCaseCommonTestsMixIn):
|
||||
|
||||
|
@ -36,7 +39,9 @@ class CopyTest(integration.ShellCase, integration.ShellCaseCommonTestsMixIn):
|
|||
if not line:
|
||||
continue
|
||||
data = yaml.load(line)
|
||||
minions.extend(data.keys())
|
||||
minions.extend(data.keys()) # pylint: disable=incompatible-py3-code
|
||||
# since we're extending a list, the Py3 dict_keys view will behave
|
||||
# as expected.
|
||||
|
||||
self.assertNotEqual(minions, [])
|
||||
|
||||
|
@ -78,7 +83,7 @@ class CopyTest(integration.ShellCase, integration.ShellCaseCommonTestsMixIn):
|
|||
))
|
||||
|
||||
data = yaml.load('\n'.join(ret))
|
||||
for part in data.values():
|
||||
for part in six.itervalues(data):
|
||||
self.assertTrue(part[minion_testfile])
|
||||
|
||||
ret = self.run_salt(
|
||||
|
|
Loading…
Add table
Reference in a new issue