mongomock
mongomock copied to clipboard
NotImplemented expression '$trim'
I am using mongomock for testing a python method which performs the case insensitive comparison by trimming the extra space from begging and end. I am using $trim operator. During the unit testing, I am getting error as mentioned below. pymongo.errors.OperationFailure: unrecognized expression '$trim'
please help me with this.
It's not implemented in mongomock yet.
We should at least return a NotImplementedError. The actual implementation of the $trim operator should also be doable, feel free to send a PR for that.