summaryrefslogtreecommitdiff
path: root/tests/test_functions.py
diff options
context:
space:
mode:
authorJesús Leganés Combarro "Piranna <jesus.lc@vaelsys.com>2012-05-23 18:57:43 +0200
committerJesús Leganés Combarro "Piranna <jesus.lc@vaelsys.com>2012-05-23 18:57:43 +0200
commit564d5f33c5a12f6ffab449a82703550037c6d6a9 (patch)
tree6f34189bf6cc19b8acfdbc55162325143d62ef62 /tests/test_functions.py
parentdf7a0d01259b772b199eab042989f14e8a04d5fb (diff)
downloadsqlparse-564d5f33c5a12f6ffab449a82703550037c6d6a9.tar.gz
Finished test for IncludeStatement
Diffstat (limited to 'tests/test_functions.py')
-rw-r--r--tests/test_functions.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/test_functions.py b/tests/test_functions.py
index ff8625a..1d2be9c 100644
--- a/tests/test_functions.py
+++ b/tests/test_functions.py
@@ -5,7 +5,7 @@ Created on 13/02/2012
'''
from unittest import main, TestCase
-from sqlparse.filters import Tokens2Unicode
+from sqlparse.filters import IncludeStatement, Tokens2Unicode
from sqlparse.lexer import tokenize
import sys
@@ -26,7 +26,10 @@ class Test_IncludeStatement(TestCase):
LIMIT 1"""
def test_includeStatement(self):
- stream = compact(tokenize(self.sql), 'tests/files')
+ stream = tokenize(self.sql)
+ includeStatement = IncludeStatement('tests/files')
+ stream = includeStatement.process(None, stream)
+ stream = compact(stream)
result = Tokens2Unicode(stream)