mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
Replace .iteritems() with six.iteritems()
Replace .iteritems() with six.iteritems() everywhere except in module_utils (because there's no 'six' on the remote host). And except in lib/ansible/galaxy/data/metadata_template.j2, because I'm not sure six is available there.
This commit is contained in:
@@ -19,6 +19,8 @@
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
from six import iteritems
|
||||
|
||||
from ansible.compat.tests import unittest
|
||||
from ansible.compat.tests.mock import patch, MagicMock
|
||||
|
||||
@@ -57,7 +59,7 @@ class TestVariableManager(unittest.TestCase):
|
||||
|
||||
vars = v.get_vars(loader=fake_loader, use_cache=False)
|
||||
|
||||
for (key, val) in extra_vars.iteritems():
|
||||
for (key, val) in iteritems(extra_vars):
|
||||
self.assertEqual(vars.get(key), val)
|
||||
|
||||
self.assertIsNot(v.extra_vars, extra_vars)
|
||||
|
||||
Reference in New Issue
Block a user