Merge "Using dict.items() is better than six.iteritems(dict)"

This commit is contained in:
Jenkins 2016-02-05 13:01:12 +00:00 committed by Gerrit Code Review
commit 5b482c33b3
3 changed files with 6 additions and 8 deletions

View File

@ -178,7 +178,7 @@ class SecretACLsController(controllers.ACLMixin):
self.acl_repo.create_or_replace_from(self.secret, secret_acl=s_acl,
user_ids=user_ids)
# delete remaining existing acls as they are not present in input.
for acl in six.itervalues(existing_acls_map):
for acl in existing_acls_map.values():
self.acl_repo.delete_entity_by_id(entity_id=acl.id,
external_project_id=None)
acl_ref = '{0}/acl'.format(
@ -347,7 +347,7 @@ class ContainerACLsController(controllers.ACLMixin):
container_acl=c_acl,
user_ids=user_ids)
# delete remaining existing acls as they are not present in input.
for acl in six.itervalues(existing_acls_map):
for acl in existing_acls_map.values():
self.acl_repo.delete_entity_by_id(entity_id=acl.id,
external_project_id=None)
acl_ref = '{0}/acl'.format(

View File

@ -11,7 +11,6 @@
# under the License.
import pecan
import six
from six.moves.urllib import parse
from barbican.api import controllers
@ -134,7 +133,7 @@ class VersionsController(object):
return {'build': version.__version__}
versions_info = [version_class.get_version_info(pecan.request) for
version_class in six.itervalues(AVAILABLE_VERSIONS)]
version_class in AVAILABLE_VERSIONS.values()]
version_output = {
'versions': {

View File

@ -22,7 +22,6 @@ import mimetypes
import mock
import pecan
import six
from testtools import testcase
import webtest
@ -382,7 +381,7 @@ class WhenGettingPuttingOrDeletingSecretUsingSecretResource(FunctionalTest):
self.assertNotIn('content_encodings', resp.namespace)
self.assertIn('content_types', resp.namespace)
self.assertIn(self.datum.content_type,
six.itervalues(resp.namespace['content_types']))
resp.namespace['content_types'].values())
self.assertNotIn('mime_type', resp.namespace)
@testcase.attr('deprecated')
@ -529,7 +528,7 @@ class WhenGettingPuttingOrDeletingSecretUsingSecretResource(FunctionalTest):
self.assertIsNotNone(resp.namespace)
self.assertIn('content_types', resp.namespace)
self.assertIn(self.datum.content_type,
six.itervalues(resp.namespace['content_types']))
resp.namespace['content_types'].values())
@mock.patch('barbican.plugin.resources.get_transport_key_id_for_retrieval')
def test_should_get_secret_meta_for_binary_with_tkey(
@ -556,7 +555,7 @@ class WhenGettingPuttingOrDeletingSecretUsingSecretResource(FunctionalTest):
self.assertIsNotNone(resp.namespace)
self.assertIn('content_types', resp.namespace)
self.assertIn(self.datum.content_type,
six.itervalues(resp.namespace['content_types']))
resp.namespace['content_types'].values())
self.assertIn('transport_key_ref', resp.namespace)
self.assertEqual(
hrefs.convert_transport_key_to_href(self.transport_key_id),