summaryrefslogtreecommitdiff
path: root/tests/test_grouping.py
diff options
context:
space:
mode:
authorVictor Uriarte <victor.m.uriarte@intel.com>2016-06-13 13:21:20 -0700
committerVictor Uriarte <victor.m.uriarte@intel.com>2016-06-15 13:28:22 -0700
commita795be1a70a241e177227b742269fb2df88af962 (patch)
tree6c5c86555d1bd0168280a38bd8afac7939f3811a /tests/test_grouping.py
parent997f95b8b6ec5129362dcfe5deedaf50800e3afc (diff)
downloadsqlparse-a795be1a70a241e177227b742269fb2df88af962.tar.gz
Change token_ funcs to token_idx funcs
Diffstat (limited to 'tests/test_grouping.py')
-rw-r--r--tests/test_grouping.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_grouping.py b/tests/test_grouping.py
index 147162f..4f904cf 100644
--- a/tests/test_grouping.py
+++ b/tests/test_grouping.py
@@ -128,11 +128,11 @@ class TestGrouping(TestCaseBase):
p = sqlparse.parse("select * from ("
"select a, b + c as d from table) sub")[0]
subquery = p.tokens[-1].tokens[0]
- iden_list = subquery.token_next_by(i=sql.IdentifierList)
+ idx, iden_list = subquery.token_idx_next_by(i=sql.IdentifierList)
self.assert_(iden_list is not None)
# all the identifiers should be within the IdentifierList
- self.assert_(subquery.token_next_by(i=sql.Identifier,
- idx=iden_list) is None)
+ _, ilist = subquery.token_idx_next_by(i=sql.Identifier, idx=idx)
+ self.assert_(ilist is None)
def test_identifier_list_case(self):
p = sqlparse.parse('a, case when 1 then 2 else 3 end as b, c')[0]