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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user