Skip to content

Commit df9e8eb

Browse files
committed
check_lookup: use plain assert
1 parent 3b1f25c commit df9e8eb

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

tests/integration/cqlengine/operators/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
from cassandra.cqlengine.operators import BaseWhereOperator
1616

1717

18-
def check_lookup(test_case, symbol, expected):
18+
def check_lookup(symbol, expected):
1919
op = BaseWhereOperator.get_operator(symbol)
20-
test_case.assertEqual(op, expected)
20+
assert op == expected

tests/integration/cqlengine/operators/test_where_operators.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ class TestWhereOperators(unittest.TestCase):
3333
def test_symbol_lookup(self):
3434
""" tests where symbols are looked up properly """
3535

36-
check_lookup(self, 'EQ', EqualsOperator)
37-
check_lookup(self, 'NE', NotEqualsOperator)
38-
check_lookup(self, 'IN', InOperator)
39-
check_lookup(self, 'GT', GreaterThanOperator)
40-
check_lookup(self, 'GTE', GreaterThanOrEqualOperator)
41-
check_lookup(self, 'LT', LessThanOperator)
42-
check_lookup(self, 'LTE', LessThanOrEqualOperator)
43-
check_lookup(self, 'CONTAINS', ContainsOperator)
44-
check_lookup(self, 'LIKE', LikeOperator)
36+
check_lookup('EQ', EqualsOperator)
37+
check_lookup('NE', NotEqualsOperator)
38+
check_lookup('IN', InOperator)
39+
check_lookup('GT', GreaterThanOperator)
40+
check_lookup('GTE', GreaterThanOrEqualOperator)
41+
check_lookup('LT', LessThanOperator)
42+
check_lookup('LTE', LessThanOrEqualOperator)
43+
check_lookup('CONTAINS', ContainsOperator)
44+
check_lookup('LIKE', LikeOperator)
4545

4646
def test_operator_rendering(self):
4747
""" tests symbols are rendered properly """
@@ -68,7 +68,7 @@ def test_is_not_null_to_cql(self):
6868
@test_category cqlengine
6969
"""
7070

71-
check_lookup(self, 'IS NOT NULL', IsNotNullOperator)
71+
check_lookup('IS NOT NULL', IsNotNullOperator)
7272

7373
# The * is not expanded because there are no referred fields
7474
assert str(TestQueryUpdateModel.filter(IsNotNull("text")).limit(2)) == 'SELECT * FROM cqlengine_test.test_query_update_model WHERE "text" IS NOT NULL LIMIT 2'

0 commit comments

Comments
 (0)