summaryrefslogtreecommitdiff
path: root/tests/regressiontests/backends/tests.py
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2012-07-20 14:48:51 +0200
committerAymeric Augustin <aymeric.augustin@m4x.org>2012-07-22 09:29:54 +0200
commitbdca5ea345c548a82a80d198906818c9ccbef896 (patch)
tree5c3f5fe5ad2522175d67b96a1fce1ff1763ba125 /tests/regressiontests/backends/tests.py
parent3cb2457f46b3e40ff6b6acffcb3fd44cbea091e5 (diff)
[py3] Replaced unicode/str by six.text_type/bytes.
Diffstat (limited to 'tests/regressiontests/backends/tests.py')
-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):