summaryrefslogtreecommitdiff
path: root/tests/test_parse.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_parse.py')
-rw-r--r--tests/test_parse.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/tests/test_parse.py b/tests/test_parse.py
index 6c9d6a6..bbe60df 100644
--- a/tests/test_parse.py
+++ b/tests/test_parse.py
@@ -8,6 +8,7 @@ from tests.utils import TestCaseBase
import sqlparse
import sqlparse.sql
+from sqlparse import compat
from sqlparse import tokens as T
@@ -30,18 +31,18 @@ class SQLParseTest(TestCaseBase):
self.assertEqual(str(stmts[1]), sql2)
def test_newlines(self):
- sql = u'select\n*from foo;'
+ sql = 'select\n*from foo;'
p = sqlparse.parse(sql)[0]
- self.assertEqual(unicode(p), sql)
- sql = u'select\r\n*from foo'
+ self.assertEqual(compat.text_type(p), sql)
+ sql = 'select\r\n*from foo'
p = sqlparse.parse(sql)[0]
- self.assertEqual(unicode(p), sql)
- sql = u'select\r*from foo'
+ self.assertEqual(compat.text_type(p), sql)
+ sql = 'select\r*from foo'
p = sqlparse.parse(sql)[0]
- self.assertEqual(unicode(p), sql)
- sql = u'select\r\n*from foo\n'
+ self.assertEqual(compat.text_type(p), sql)
+ sql = 'select\r\n*from foo\n'
p = sqlparse.parse(sql)[0]
- self.assertEqual(unicode(p), sql)
+ self.assertEqual(compat.text_type(p), sql)
def test_within(self):
sql = 'foo(col1, col2)'