diff --git a/test/mockupdb/operations.py b/test/mockupdb/operations.py index efb9e5084e..90d7f27c39 100644 --- a/test/mockupdb/operations.py +++ b/test/mockupdb/operations.py @@ -14,7 +14,7 @@ from collections import namedtuple -from mockupdb import OpMsg, OpMsgReply, OpReply +from mockupdb import OpMsgReply, OpReply from pymongo import ReadPreference @@ -61,12 +61,19 @@ not_master=not_master_reply, ), Operation( - "count", + "count_documents", lambda client: client.db.collection.count_documents({}), reply={"n": 1}, op_type="may-use-secondary", not_master=not_master_reply, ), + Operation( + "estimated_document_count", + lambda client: client.db.collection.estimated_document_count(), + reply={"n": 1}, + op_type="may-use-secondary", + not_master=not_master_reply, + ), Operation( "aggregate", lambda client: client.db.collection.aggregate([]), @@ -109,12 +116,4 @@ Upgrade = namedtuple("Upgrade", ["name", "function", "old", "new", "wire_version"]) -upgrades = [ - Upgrade( - "estimated_document_count", - lambda client: client.db.collection.estimated_document_count(), - old=OpMsg("count", "collection", namespace="db"), - new=OpMsg("aggregate", "collection", namespace="db"), - wire_version=12, - ), -] +upgrades = []