fixed the last of the broken tests

This commit is contained in:
Jon Haddad
2014-06-19 14:57:18 -07:00
parent bcec8a4d22
commit 24d8989069

View File

@@ -30,7 +30,7 @@ class BatchTest(BaseTimestampTest):
with mock.patch.object(self.session, "execute") as m, BatchQuery(timestamp=timedelta(seconds=30)) as b:
TestTimestampModel.batch(b).create(count=1)
"USING TIMESTAMP".should.be.within(m.call_args[0][0])
"USING TIMESTAMP".should.be.within(m.call_args[0][0].query_string)
class CreateWithTimestampTest(BaseTimestampTest):
@@ -39,7 +39,7 @@ class CreateWithTimestampTest(BaseTimestampTest):
with mock.patch.object(self.session, "execute") as m, BatchQuery() as b:
TestTimestampModel.timestamp(timedelta(seconds=10)).batch(b).create(count=1)
query = m.call_args[0][0]
query = m.call_args[0][0].query_string
query.should.match(r"INSERT.*USING TIMESTAMP")
query.should_not.match(r"TIMESTAMP.*INSERT")
@@ -86,7 +86,7 @@ class UpdateWithTimestampTest(BaseTimestampTest):
with mock.patch.object(self.session, "execute") as m, BatchQuery() as b:
self.instance.batch(b).timestamp(timedelta(seconds=30)).update(count=2)
query = m.call_args[0][0]
query = m.call_args[0][0].query_string
"USING TIMESTAMP".should.be.within(query)