aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Ordoquy2012-11-22 00:43:56 +0100
committerXavier Ordoquy2012-11-22 00:43:56 +0100
commit49f8e6419ad79a27c462eb4b0690f139ab8091de (patch)
tree88eb76f73bb8c008f18c88fde1ba5b7233809296
parent43c9a1c466a4aab4657419c38451337108e49994 (diff)
downloaddjango-rest-framework-49f8e6419ad79a27c462eb4b0690f139ab8091de.tar.bz2
Fixed python2.7 compat issue.
-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})