Implement boolean operators by hellocoldworld · Pull Request #663 · mongomock/mongomock
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this, it's exactly the right way.
I've added few comments in the tests, and I think you could also decide to cover extra cases where the syntax is not correct (for instance {'$and': 2}), but you can add a TODO and push those corner cases in a future PR.
Also make sure the CI passes, including the coverage check.