aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rest_framework/compat.py2
-rw-r--r--rest_framework/tests/files.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/rest_framework/compat.py b/rest_framework/compat.py
index dcc8aaa6..8c7617c1 100644
--- a/rest_framework/compat.py
+++ b/rest_framework/compat.py
@@ -17,7 +17,7 @@ except:
# cStringIO only if it's available, otherwise StringIO
try:
- import cStringIO as StringIO
+ import cStringIO.StringIO as StringIO
except ImportError:
from six import StringIO
diff --git a/rest_framework/tests/files.py b/rest_framework/tests/files.py
index 027aecf7..e7609706 100644
--- a/rest_framework/tests/files.py
+++ b/rest_framework/tests/files.py
@@ -29,7 +29,7 @@ class FileSerializerTests(TestCase):
def test_create(self):
now = datetime.datetime.now()
- file = StringIO.StringIO('stuff')
+ file = StringIO('stuff')
file.name = 'stuff.txt'
file.size = file.len
serializer = UploadedFileSerializer(data={'created': now}, files={'file': file})