From f368c25f10f3dd3031f16b147dd814ba098884f5 Mon Sep 17 00:00:00 2001 From: Florian Apolloner Date: Sat, 23 Feb 2013 18:47:36 +0100 Subject: [PATCH] Fixed errors introduced in 664855b74e1f417384dc7aef35a3df5f86db52d6 --- tests/modeltests/files/tests.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/modeltests/files/tests.py b/tests/modeltests/files/tests.py index 8fbdbb8ff3..4039fd90b0 100644 --- a/tests/modeltests/files/tests.py +++ b/tests/modeltests/files/tests.py @@ -2,7 +2,6 @@ from __future__ import absolute_import import gzip import shutil -import StringIO import tempfile from django.core.cache import cache @@ -11,6 +10,7 @@ from django.core.files.base import ContentFile 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 @@ class FileStorageTests(TestCase): 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 @@ class FileStorageTests(TestCase): self.assertTrue(temp_storage.exists('tests/stringio')) self.assertEqual( temp_storage.open('tests/stringio').read(), - 'content') + b'content')