mongomock icon indicating copy to clipboard operation
mongomock copied to clipboard

NotImplemented expression '$trim'

Open impawan opened this issue 5 years ago • 1 comments

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.

impawan avatar Sep 11 '20 12:09 impawan

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.

pcorpet avatar Oct 03 '20 18:10 pcorpet