1
0
mirror of https://github.com/django/django.git synced 2025-10-27 23:56:08 +00:00

Replaced cStringIO.StringIO by io.BytesIO.

Also replaced StringIO.StringIO by BytesIO in some other appropriate
places. StringIO is not available in Python 3.
This commit is contained in:
Claude Paroz
2012-05-05 19:47:03 +02:00
parent 1583d40224
commit d7dfab59ea
26 changed files with 94 additions and 167 deletions

View File

@@ -1,6 +1,6 @@
import copy
import sys
from cStringIO import StringIO
from io import BytesIO
from django.core.management.validation import get_validation_errors
from django.db.models.loading import cache, load_app
@@ -16,7 +16,7 @@ class InvalidModelTestCase(unittest.TestCase):
# coloring attached (makes matching the results easier). We restore
# sys.stderr afterwards.
self.old_stdout = sys.stdout
self.stdout = StringIO()
self.stdout = BytesIO()
sys.stdout = self.stdout
# This test adds dummy applications to the app cache. These