PYTHON-5680 Fix handling of expectedDocuments in Unified Test Runner (#2665)
This commit is contained in:
parent
e9658b2406
commit
2f263d4d3f
@ -1458,7 +1458,7 @@ class UnifiedSpecTestMixinV1(AsyncIntegrationTest):
|
||||
read_concern=ReadConcern(level="local"),
|
||||
)
|
||||
|
||||
if expected_documents:
|
||||
if expected_documents is not None:
|
||||
sorted_expected_documents = sorted(expected_documents, key=lambda doc: doc["_id"])
|
||||
actual_documents = await coll.find({}, sort=[("_id", ASCENDING)]).to_list()
|
||||
self.assertListEqual(sorted_expected_documents, actual_documents)
|
||||
|
||||
@ -1445,7 +1445,7 @@ class UnifiedSpecTestMixinV1(IntegrationTest):
|
||||
read_concern=ReadConcern(level="local"),
|
||||
)
|
||||
|
||||
if expected_documents:
|
||||
if expected_documents is not None:
|
||||
sorted_expected_documents = sorted(expected_documents, key=lambda doc: doc["_id"])
|
||||
actual_documents = coll.find({}, sort=[("_id", ASCENDING)]).to_list()
|
||||
self.assertListEqual(sorted_expected_documents, actual_documents)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user