fixed the last of the broken tests
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user