File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ async def test_add_remove_option_exhaust(self):
129
129
# Exhaust - which mongos doesn't support
130
130
if async_client_context .is_mongos :
131
131
with self .assertRaises (InvalidOperation ):
132
- self .db .test .find (cursor_type = CursorType .EXHAUST )
132
+ await anext ( self .db .test .find (cursor_type = CursorType .EXHAUST ) )
133
133
else :
134
134
cursor = self .db .test .find (cursor_type = CursorType .EXHAUST )
135
135
self .assertEqual (64 , cursor ._query_flags )
Original file line number Diff line number Diff line change @@ -192,7 +192,7 @@ async def test_unpin_for_next_transaction(self):
192
192
addresses = set ()
193
193
for _ in range (UNPIN_TEST_MAX_ATTEMPTS ):
194
194
async with await s .start_transaction ():
195
- cursor = await coll .find ({}, session = s )
195
+ cursor = coll .find ({}, session = s )
196
196
self .assertTrue (await anext (cursor ))
197
197
addresses .add (cursor .address )
198
198
# Break early if we can.
@@ -219,7 +219,7 @@ async def test_unpin_for_non_transaction_operation(self):
219
219
220
220
addresses = set ()
221
221
for _ in range (UNPIN_TEST_MAX_ATTEMPTS ):
222
- cursor = await coll .find ({}, session = s )
222
+ cursor = coll .find ({}, session = s )
223
223
self .assertTrue (await anext (cursor ))
224
224
addresses .add (cursor .address )
225
225
# Break early if we can.
Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ def test_add_remove_option_exhaust(self):
129
129
# Exhaust - which mongos doesn't support
130
130
if client_context .is_mongos :
131
131
with self .assertRaises (InvalidOperation ):
132
- self .db .test .find (cursor_type = CursorType .EXHAUST )
132
+ next ( self .db .test .find (cursor_type = CursorType .EXHAUST ) )
133
133
else :
134
134
cursor = self .db .test .find (cursor_type = CursorType .EXHAUST )
135
135
self .assertEqual (64 , cursor ._query_flags )
You can’t perform that action at this time.
0 commit comments