@contextmanager
def check_mongo_calls(num_finds=0, num_sends=None):
 with check_mongo_calls_range(num_finds, num_finds, num_sends, num_sends):
  (yield)

@ contextmanager def check_mongo_calls ( num_finds = 0 , num_sends = None ) : with check_mongo_calls_range ( num_finds , num_finds , num_sends , num_sends ) : ( yield )
instruments the given store to count the number of calls to find and the number of calls to send_message which is for insert .