Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed errors introduced in 664855b

  • Loading branch information...
commit f368c25f10f3dd3031f16b147dd814ba098884f5 1 parent 5ae0c93
@apollo13 apollo13 authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 tests/modeltests/files/tests.py
View
8 tests/modeltests/files/tests.py
@@ -2,7 +2,6 @@
import gzip
import shutil
-import StringIO
import tempfile
from django.core.cache import cache
@@ -11,6 +10,7 @@
from django.core.files.uploadedfile import SimpleUploadedFile
from django.test import TestCase
from django.utils import unittest
+from django.utils.six import StringIO
from .models import Storage, temp_storage, temp_storage_location
@@ -115,12 +115,12 @@ def test_file_object(self):
self.assertTrue(temp_storage.exists('tests/file_obj'))
self.assertEqual(
temp_storage.open('tests/file_obj').read(),
- 'some content')
+ b'some content')
def test_stringio(self):
# Test passing StringIO instance as content argument to save
- output = StringIO.StringIO()
+ output = StringIO()
output.write('content')
output.seek(0)
@@ -129,7 +129,7 @@ def test_stringio(self):
self.assertTrue(temp_storage.exists('tests/stringio'))
self.assertEqual(
temp_storage.open('tests/stringio').read(),
- 'content')
+ b'content')
Please sign in to comment.
Something went wrong with that request. Please try again.