Fixing bug in test_where_operators, also adding C* 2.0 exclusion for NE tests

This commit is contained in:
GregBestland
2016-04-07 14:59:29 -05:00
parent 0574318f0c
commit 85ef15870e
2 changed files with 4 additions and 2 deletions

View File

@@ -39,7 +39,7 @@ class TestWhereOperators(TestCase):
def test_operator_rendering(self):
""" tests symbols are rendered properly """
self.assertEqual("=", six.text_type(EqualsOperator()))
self.assertEqual("=!", six.text_type(NotEqualsOperator()))
self.assertEqual("!=", six.text_type(NotEqualsOperator()))
self.assertEqual("IN", six.text_type(InOperator()))
self.assertEqual(">", six.text_type(GreaterThanOperator()))
self.assertEqual(">=", six.text_type(GreaterThanOrEqualOperator()))

View File

@@ -27,7 +27,7 @@ from cassandra.cqlengine.query import BatchQuery, LWTException
from cassandra.cqlengine.statements import ConditionalClause
from tests.integration.cqlengine.base import BaseCassEngTestCase
from tests.integration import CASSANDRA_VERSION
from tests.integration import CASSANDRA_VERSION, greaterthancass20
class TestConditionalModel(Model):
@@ -154,6 +154,7 @@ class TestConditional(BaseCassEngTestCase):
TestConditionalModel.objects(id=t.id).iff(count=5).delete()
self.assertEqual(TestConditionalModel.objects(id=t.id).count(), 0)
@greaterthancass20
def test_delete_lwt_ne(self):
"""
Test to ensure that deletes using IF and not equals are honored correctly
@@ -181,6 +182,7 @@ class TestConditional(BaseCassEngTestCase):
TestConditionalModel.objects(id=t.id).iff(count__ne=2).delete()
self.assertEqual(TestConditionalModel.objects(id=t.id).count(), 0)
@greaterthancass20
def test_update_lwt_ne(self):
"""
Test to ensure that update using IF and not equals are honored correctly