mongomock
mongomock copied to clipboard
Small library for mocking pymongo collection objects for testing purposes
Currently it is a single bloated function, which is very hard to maintain
The following exception is raised when using pymongo 4.3.2 but it worked for pymongo 4.2: ```python TypeError: __new__() got an unexpected keyword argument 'datetime_conversion' ``` With the following code snippet...
Right now, `list_database_names` for a newly created `mongomock.MongoClient` returns an empty list. This creates a discrepancy with the fact that the mock client does in fact have a `db` Database,...
`NotImplementedError: Although '$indexOfArray' is a valid array operator for the aggregation pipeline, it is currently not implemented in Mongomock.`
When I want to test my development using merge operator, this error occurs: ``` NotImplementedError: $setWindowFields is not a valid operator for the aggregation pipeline. See http://docs.mongodb.org/manual/meta/aggregation-quick-reference/ for a complete...
The main change introduced in this PR is to explicitly assign an updated document to the collection store: ``` self._store[existing_document['_id']] = existing_document ``` This allows me to efficiently implement a...
As part of writing tests I have encounter that $reduce is not implemented. Is there any plan for this operator to be release soon?
Hey ! First thanks for all the job ! I encountered an error using pytest-mongodb using Python 3.9.7, pytest-mongodb==2.2.0, mongomock==4.1.2. Using a $map operator after a $sum doesn't seem to...