PYTHON-2764 Fix unified test coerce_result on unack writes (#652)
(cherry picked from commit 3ef01179a2)
This commit is contained in:
parent
a08ac8581e
commit
9e5ab1b5b9
@ -614,6 +614,8 @@ class MatchEvaluatorUtil(object):
|
||||
|
||||
def coerce_result(opname, result):
|
||||
"""Convert a pymongo result into the spec's result format."""
|
||||
if hasattr(result, 'acknowledged') and not result.acknowledged:
|
||||
return {'acknowledged': False}
|
||||
if opname == 'bulkWrite':
|
||||
return parse_bulk_write_result(result)
|
||||
if opname == 'insertOne':
|
||||
|
||||
Loading…
Reference in New Issue
Block a user