summaryrefslogtreecommitdiff
path: root/tests/regressiontests/backends
diff options
context:
space:
mode:
Diffstat (limited to 'tests/regressiontests/backends')
-rw-r--r--tests/regressiontests/backends/tests.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/regressiontests/backends/tests.py b/tests/regressiontests/backends/tests.py
index cb25ac0a32..fa41aa7401 100644
--- a/tests/regressiontests/backends/tests.py
+++ b/tests/regressiontests/backends/tests.py
@@ -16,6 +16,7 @@ from django.db.utils import ConnectionHandler, DatabaseError, load_backend
from django.test import (TestCase, skipUnlessDBFeature, skipIfDBFeature,
TransactionTestCase)
from django.test.utils import override_settings
+from django.utils import six
from django.utils import unittest
from . import models
@@ -50,7 +51,7 @@ class OracleChecks(unittest.TestCase):
# than 4000 chars and read it properly
c = connection.cursor()
c.execute('CREATE TABLE ltext ("TEXT" NCLOB)')
- long_str = ''.join([unicode(x) for x in xrange(4000)])
+ long_str = ''.join([six.text_type(x) for x in xrange(4000)])
c.execute('INSERT INTO ltext VALUES (%s)',[long_str])
c.execute('SELECT text FROM ltext')
row = c.fetchone()
@@ -154,7 +155,7 @@ class LastExecutedQueryTest(TestCase):
sql, params = tags.query.sql_with_params()
cursor = tags.query.get_compiler('default').execute_sql(None)
last_sql = cursor.db.ops.last_executed_query(cursor, sql, params)
- self.assertTrue(isinstance(last_sql, unicode))
+ self.assertTrue(isinstance(last_sql, six.text_type))
class ParameterHandlingTest(TestCase):