fixed multiple broken tests due to simple statement wrapper

This commit is contained in:
Jon Haddad
2014-06-19 14:13:17 -07:00
parent 1d58e740bd
commit 3b6a3a739d
3 changed files with 4 additions and 4 deletions

View File

@@ -69,7 +69,7 @@ class MaxTimeUUID(BaseQueryFunction):
http://cassandra.apache.org/doc/cql3/CQL.html#timeuuidFun
"""
format_string = 'MaxTimeUUID(:{})'
format_string = 'MaxTimeUUID(%({})s)'
def __init__(self, value):
"""
@@ -109,7 +109,7 @@ class Token(BaseQueryFunction):
return len(self.value)
def __unicode__(self):
token_args = ', '.join(':{}'.format(self.context_id + i) for i in range(self.get_context_size()))
token_args = ', '.join('%({})s'.format(self.context_id + i) for i in range(self.get_context_size()))
return "token({})".format(token_args)
def update_context(self, ctx):

View File

@@ -6,7 +6,7 @@ from decimal import Decimal as D
from unittest import TestCase
from uuid import uuid4, uuid1
from cqlengine import ValidationError
from cqlengine.connection import execute, execute_native
from cqlengine.connection import execute_native
from cqlengine.tests.base import BaseCassEngTestCase

View File

@@ -130,7 +130,7 @@ class TestPolymorphicModel(BaseCassEngTestCase):
# not sure how we would even get here if it was in there
# since the CQL would fail.
self.assertNotIn("row_type", m.call_args[0][0])
self.assertNotIn("row_type", m.call_args[0][0].query_string)