summaryrefslogtreecommitdiff
path: root/test/functional/test_account.py
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2015-05-25 18:28:02 +0200
committerChristian Schwede <cschwede@redhat.com>2015-06-23 07:29:15 +0000
commite5c962a28ce99f01c6cd0b68b7434ddcd0e55f62 (patch)
treee57edbd569e66fb0c4cd24034a73e4ddabdf562f /test/functional/test_account.py
parent0009a43eb45fdee6716d1272b346cfc76d946e4b (diff)
downloadswift-e5c962a28ce99f01c6cd0b68b7434ddcd0e55f62.tar.gz
Replace xrange() with six.moves.range()
Patch generated by the xrange operation of the sixer tool: https://pypi.python.org/pypi/sixer Manual changes: * Fix indentation for pep8 checks * Fix TestGreenthreadSafeIterator.test_access_is_serialized of test.unit.common.test_utils: replace range(1, 11) with list(range(1, 11)) * Fix UnsafeXrange docstring, revert change Change-Id: Icb7e26135c5e57b5302b8bfe066b33cafe69fe4d
Diffstat (limited to 'test/functional/test_account.py')
-rwxr-xr-xtest/functional/test_account.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/functional/test_account.py b/test/functional/test_account.py
index 0bd7b886c..b6c5abedc 100755
--- a/test/functional/test_account.py
+++ b/test/functional/test_account.py
@@ -21,6 +21,7 @@ from uuid import uuid4
from nose import SkipTest
from string import letters
+from six.moves import range
from swift.common.middleware.acl import format_acl
from test.functional import check_response, retry, requires_acls, \
@@ -790,13 +791,13 @@ class TestAccount(unittest.TestCase):
resp = retry(post, headers)
headers = {}
- for x in xrange(self.max_meta_count):
+ for x in range(self.max_meta_count):
headers['X-Account-Meta-%d' % x] = 'v'
resp = retry(post, headers)
resp.read()
self.assertEqual(resp.status, 204)
headers = {}
- for x in xrange(self.max_meta_count + 1):
+ for x in range(self.max_meta_count + 1):
headers['X-Account-Meta-%d' % x] = 'v'
resp = retry(post, headers)
resp.read()