mongomock icon indicating copy to clipboard operation
mongomock copied to clipboard

Small library for mocking pymongo collection objects for testing purposes

Results 194 mongomock issues
Sort by recently updated
recently updated
newest added

Reproduce the issue: ``` python --version Python 3.7.17 pip install --pre mongomock python -c "import mongomock" Traceback (most recent call last): File "", line 1, in File "/home/denolf/.local/wdnbashutils/virtualenvs/pybox_wJkmoe/lib/python3.7/site-packages/mongomock/__init__.py", line 79,...

- draft for support for $sortByCount in the $facet stage

change collation to match the signature of https://github.com/mongodb/mongo-python-driver/blob/3e5387e0ac77131c00b0912367e2237225d18d76/pymongo/synchronous/cursor.py#L865

Hey, I was trying to test an aggregation pipeline that I created, like the one below: ```python [ { "$match":{ "_id":{ "$in":"assignments" }, "entity":"entity" } }, { "$addFields":{ "entity_id":{ "$toObjectId":"$entity_id"...

Hello everyone, In pymongo version 4.10.1, the method `_add_to_bulk` in the class `UpdateOne` [here](https://github.com/mongodb/mongo-python-driver/blob/77cd7ab9f6dc48e72a3bae94d2cca2e4200e6978/pymongo/operations.py#L585) calls `BulkOperationBuilder.add_update` this way: ```python def _add_to_bulk(self, bulkobj: _AgnosticBulk) -> None: """Add this operation to the...

This PR adds runnable example scripts inside the examples/ directory to demonstrate usage of mongomock: The examples can be run with python -m examples., providing an easy way for users...

`mongomock` is seeking new maintainer(s) to help drive the project forward. This is an excellent opportunity for someone passionate about Python testing and MongoDB to make a significant impact in...

`pymongo` has an async interface, currently in beta: https://pymongo.readthedocs.io/en/stable/async-tutorial.html It'd be great if mongomock supported it. I.e., mongomock.AsyncMongoClient() would mock AsyncMongoClient and give you an AsyncDatabase, etc.