summaryrefslogtreecommitdiff
path: root/tests/test_utils.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@enovance.com>2014-03-24 18:20:22 +0100
committerGerrit Code Review <review@openstack.org>2014-03-28 15:04:14 +0000
commite3b7ecd2bbc5120444b3c1643fb89ccd47e454bb (patch)
tree81d61ff9d84daf6374ede0db7e7fb9a32d635a95 /tests/test_utils.py
parentcdf6f84c360088d39af1b8e1745c102fc44ac362 (diff)
downloadpython-swiftclient-e3b7ecd2bbc5120444b3c1643fb89ccd47e454bb.tar.gz
Python 3: Fix module names in import
Use six.moves to fix imports on Python 3. Change-Id: I35b9405690e9f0607b24d79aa7c00830df954c41
Diffstat (limited to 'tests/test_utils.py')
-rw-r--r--tests/test_utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_utils.py b/tests/test_utils.py
index 4c4b29d..d9d74c5 100644
--- a/tests/test_utils.py
+++ b/tests/test_utils.py
@@ -15,7 +15,7 @@
import testtools
-from StringIO import StringIO
+import six
import tempfile
from swiftclient import utils as u
@@ -125,7 +125,7 @@ class TestPrtBytes(testtools.TestCase):
class TestLengthWrapper(testtools.TestCase):
def test_stringio(self):
- contents = StringIO('a' * 100)
+ contents = six.StringIO('a' * 100)
data = u.LengthWrapper(contents, 42)
self.assertEqual(42, len(data))
read_data = ''.join(iter(data.read, ''))