mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Refs #24324 -- Fixed Python 2 test failures when path to Django source contains non-ASCII characters.
This commit is contained in:
parent
fa66ea7532
commit
307c0f299a
9 changed files with 31 additions and 23 deletions
|
@ -5,6 +5,7 @@ from django.db import connection
|
|||
from django.test import TestCase
|
||||
from django.test.runner import DiscoverRunner
|
||||
from django.utils import six
|
||||
from django.utils.encoding import force_text
|
||||
|
||||
from .models import Person
|
||||
|
||||
|
@ -42,8 +43,9 @@ class TestDebugSQL(unittest.TestCase):
|
|||
).run(suite)
|
||||
runner.teardown_databases(old_config)
|
||||
|
||||
stream.seek(0)
|
||||
return stream.read()
|
||||
if six.PY2:
|
||||
stream.buflist = [force_text(x) for x in stream.buflist]
|
||||
return stream.getvalue()
|
||||
|
||||
def test_output_normal(self):
|
||||
full_output = self._test_output(1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue