Merge "Remove enumerate calls"

This commit is contained in:
Jenkins 2013-08-29 01:45:08 +00:00 committed by Gerrit Code Review
commit 999b939572

View File

@ -1120,7 +1120,7 @@ class TestAuthJSON(test_v3.RestfulTestCase):
r = self.post('/auth/tokens', body=auth_data)
token = self.assertValidScopedTokenResponse(r)
roles_ids = []
for i, ref in enumerate(token['roles']):
for ref in token['roles']:
roles_ids.append(ref['id'])
self.assertEqual(len(token['roles']), 2)
self.assertIn(role_list[1]['id'], roles_ids)
@ -1134,7 +1134,7 @@ class TestAuthJSON(test_v3.RestfulTestCase):
r = self.post('/auth/tokens', body=auth_data)
token = self.assertValidScopedTokenResponse(r)
roles_ids = []
for i, ref in enumerate(token['roles']):
for ref in token['roles']:
roles_ids.append(ref['id'])
self.assertEqual(len(token['roles']), 2)
self.assertIn(role_list[0]['id'], roles_ids)
@ -1152,7 +1152,7 @@ class TestAuthJSON(test_v3.RestfulTestCase):
r = self.post('/auth/tokens', body=auth_data)
token = self.assertValidScopedTokenResponse(r)
roles_ids = []
for i, ref in enumerate(token['roles']):
for ref in token['roles']:
roles_ids.append(ref['id'])
self.assertEqual(len(token['roles']), 3)
self.assertIn(role_list[1]['id'], roles_ids)