summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Uriarte <victor.m.uriarte@intel.com>2016-05-30 22:34:48 -0700
committerVictor Uriarte <victor.m.uriarte@intel.com>2016-06-04 11:08:23 -0700
commitf5ff827bf168a83cb5062852f179dacdf2bcf755 (patch)
treedc7b04efc76d06a40e76e74511d8cc8617b09a4f
parentaf2a3fa7eb75c534ca76b8c0cc2ca6731fdb2efb (diff)
downloadsqlparse-f5ff827bf168a83cb5062852f179dacdf2bcf755.tar.gz
Fix test that wasn't evaluating
AssertTrue wasn't comparing the value, just checking if value was not False Fix and changed AssertTrue to Assert_ to match style used else throught tests
-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 4cc3601..c35c61b 100644
--- a/tests/test_grouping.py
+++ b/tests/test_grouping.py
@@ -150,12 +150,12 @@ class TestGrouping(TestCaseBase):
s = 'select * from foo where bar = 1 order by id desc'
p = sqlparse.parse(s)[0]
self.ndiffAssertEqual(s, u(p))
- self.assertTrue(len(p.tokens), 16)
+ self.assert_(len(p.tokens) == 14)
+
s = 'select x from (select y from foo where bar = 1) z'
p = sqlparse.parse(s)[0]
self.ndiffAssertEqual(s, u(p))
- self.assertTrue(isinstance(p.tokens[-1].tokens[0].tokens[-2],
- sql.Where))
+ self.assert_(isinstance(p.tokens[-1].tokens[0].tokens[-2], sql.Where))
def test_typecast(self):
s = 'select foo::integer from bar'