Skip to content

Commit 9e5ab1b

Browse files
committed
PYTHON-2764 Fix unified test coerce_result on unack writes (#652)
(cherry picked from commit 3ef0117)
1 parent a08ac85 commit 9e5ab1b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/unified_format.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,8 @@ def match_event(self, event_type, expectation, actual):
614614

615615
def coerce_result(opname, result):
616616
"""Convert a pymongo result into the spec's result format."""
617+
if hasattr(result, 'acknowledged') and not result.acknowledged:
618+
return {'acknowledged': False}
617619
if opname == 'bulkWrite':
618620
return parse_bulk_write_result(result)
619621
if opname == 'insertOne':

0 commit comments

Comments
 (0)