diff options
| author | Andi Albrecht <albrecht.andi@gmail.com> | 2016-05-15 21:02:17 +0200 |
|---|---|---|
| committer | Andi Albrecht <albrecht.andi@gmail.com> | 2016-05-15 21:02:17 +0200 |
| commit | efb6fd4bdb80b985c356bb6eb996e6e25cf63b05 (patch) | |
| tree | 5ca2ce45fc9cf0a35efbcf68bb643f3a12e2575d /tests | |
| parent | 9ab1464ea9c1d0296d698d9637ed3e3cd92326f9 (diff) | |
| parent | 955996e3e5c49fb6b7f200ceecee2f8082656ac4 (diff) | |
| download | sqlparse-efb6fd4bdb80b985c356bb6eb996e6e25cf63b05.tar.gz | |
Merge pull request #235 from vmuriart/refactor
Refactor
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_functions.py | 3 | ||||
| -rw-r--r-- | tests/test_grouping.py | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/tests/test_functions.py b/tests/test_functions.py index 425ab7f..9207815 100644 --- a/tests/test_functions.py +++ b/tests/test_functions.py @@ -13,6 +13,7 @@ sys.path.insert(0, '..') from sqlparse.filters import compact from sqlparse.functions import getcolumns, getlimit, IsType +from tests.utils import FILES_DIR class Test_IncludeStatement(TestCase): @@ -27,7 +28,7 @@ class Test_IncludeStatement(TestCase): def test_includeStatement(self): stream = tokenize(self.sql) - includeStatement = IncludeStatement('tests/files', + includeStatement = IncludeStatement(FILES_DIR, raiseexceptions=True) stream = includeStatement.process(None, stream) stream = compact(stream) diff --git a/tests/test_grouping.py b/tests/test_grouping.py index 7dc1269..daaec9b 100644 --- a/tests/test_grouping.py +++ b/tests/test_grouping.py @@ -89,9 +89,9 @@ class TestGrouping(TestCaseBase): p = sqlparse.parse('a.')[0] self.assert_(isinstance(p.tokens[0], sql.Identifier)) self.assertEqual(p.tokens[0].has_alias(), False) - self.assertEqual(p.tokens[0].get_name(), None) - self.assertEqual(p.tokens[0].get_real_name(), None) - self.assertEqual(p.tokens[0].get_parent_name(), 'a') + self.assertEqual(p.tokens[0].get_name(), 'a') + self.assertEqual(p.tokens[0].get_real_name(), 'a') + self.assertEqual(p.tokens[0].get_parent_name(), None) def test_identifier_as_invalid(self): # issue8 p = sqlparse.parse('foo as select *')[0] |
