python-mock-firestore
python-mock-firestore copied to clipboard
In-memory implementation of Google Cloud Firestore for use in tests
Reference: https://github.com/mdowds/python-mock-firestore/blob/0de34b1c319c08ccbcc6887d110f3bf8f5ff2116/mockfirestore/document.py#L42 While mocking fireo ORM, get queries cannot execute due to missing `transactions` argument for document.get() method. Google Firestore v1 library provides transactions argument: https://github.com/googleapis/python-firestore/blob/2d42731996586fd63e9b8453b0eb627d3e23a310/google/cloud/firestore_v1/document.py#L362
Every new document save requires a deepcopy of the entire dataset, since every document contains the `_data` field. There must be a way around this. Why is deepcopy necessary? Can...
Builds on #78 Adds support for passing arbitrary kwargs into the `doc_ref.get()` method, e.g. `transaction=` This is used by e.g. fireo [here](https://github.com/octabytes/FireO/blob/master/src/fireo/queries/get_query.py#L57)
Actual firestore client has a `path` property, documented [here](https://cloud.google.com/python/docs/reference/firestore/latest/document) This is used in e.g. [fireo](https://cloud.google.com/python/docs/reference/firestore/latest/document)
Hi, do you guys want a PR with support for asyncio?
Tiny hack to support `batch` method
Addresses issue #72.
``` google-cloud-firestore = "^2.11.1" mock-firestore = "^0.11.0" ``` ` site-packages/google/cloud/firestore_v1/base_collection.py:290: UserWarning: Detected filter using positional arguments. Prefer using the 'filter' keyword argument instead.` i.e. instead of `col.where(_DELETED_ATTR, "==", False)` it...
I needed async support and spent a whole day implementing it. Just before I went to submit a merge request I found the MyPy page with a newer version containing...
I found out that writing transforms, for example increments, on an empty doc stores the actual objects in the in-memory db, e.g. ``` # some code writing to the db...