Make find(projection=...) return copies of the values by niklasj · Pull Request #753 · mongomock/mongomock

pcorpet

requested changes Feb 6, 2022

Make sure that the values returned from find() and find_one() when a
projection is specified don't share any references to the actual db
documents.

Fixes mongomock#728
Copy only included fields, and only do it once.

pcorpet

@niklasj