python-mock-firestore:在测试中使用的Google Cloud Firestore的内存实现

时间:2021-05-05 20:13:45
【文件属性】:
文件名称:python-mock-firestore:在测试中使用的Google Cloud Firestore的内存实现
文件大小:20KB
文件格式:ZIP
更新时间:2021-05-05 20:13:45
Python Python模拟Firestore Google Cloud Firestore的的内存实现,旨在用于测试中以替换真实对象。 该项目尚处于初期阶段,只是真正客户库的部分实现。 安装: pip install mock-firestore Python 3.5+是运行它所必需的。 用法 db = firestore . Client () mock_db = MockFirestore () # Can be used in the same way as a firestore.Client() object would be, e.g.: db . collection ( 'users' ). get () mock_db . collection ( 'users' ). get () 要将存储重置为空状态,请使用reset()方法: mock_db = MockFire
【文件预览】:
python-mock-firestore-master
----setup.py(692B)
----.gitignore(1KB)
----requirements-dev-minimal.txt(22B)
----LICENSE(1KB)
----.github()
--------workflows()
----README.md(5KB)
----tests()
--------__init__.py(0B)
--------test_document_snapshot.py(4KB)
--------test_timestamp.py(407B)
--------test_mock_client.py(549B)
--------test_document_reference.py(9KB)
--------test_collection_reference.py(17KB)
--------test_transaction.py(3KB)
----mockfirestore()
--------__init__.py(689B)
--------client.py(2KB)
--------collection.py(3KB)
--------transaction.py(4KB)
--------document.py(4KB)
--------_helpers.py(2KB)
--------query.py(5KB)
--------exceptions.py(372B)

网友评论