mongomock-motor-0.0.9
توضیحات
Library for mocking AsyncIOMotorClient built on top of mongomock.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | mongomock-motor-0.0.9 |
| نام | mongomock-motor |
| نسخه کتابخانه | 0.0.9 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Michael Kryukov |
| ایمیل نویسنده | kryukov.ms@ya.ru |
| آدرس صفحه اصلی | https://github.com/michaelkryukov/mongomock_motor |
| آدرس اینترنتی | https://pypi.org/project/mongomock-motor/ |
| مجوز | MIT |
# mongomock-motor
[](https://badge.fury.io/py/mongomock-motor)
[](https://app.fossa.com/projects/git%2Bgithub.com%2Fmichaelkryukov%2Fmongomock_motor?ref=badge_shield)
Best effort mock for [AsyncIOMotorClient](https://motor.readthedocs.io/en/stable/api-asyncio/asyncio_motor_client.html)
(Database, Collection, e.t.c) built on top of [mongomock](https://github.com/mongomock/mongomock) library.
## Example / Showcase
```py
from mongomock_motor import AsyncMongoMockClient
async def test_mock_client():
collection = AsyncMongoMockClient()['tests']['test-1']
assert await collection.find({}).to_list(None) == []
result = await collection.insert_one({'a': 1})
assert result.inserted_id
assert len(await collection.find({}).to_list(None)) == 1
```
## License
[](https://app.fossa.com/projects/git%2Bgithub.com%2Fmichaelkryukov%2Fmongomock_motor?ref=badge_large)
نیازمندی
| مقدار | نام |
|---|---|
| - | mongomock<5.0.0,>=4.1.2 |
| - | motor>=2.5 |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| <4.0,>=3.8 | Python |
نحوه نصب
نصب پکیج whl mongomock-motor-0.0.9:
pip install mongomock-motor-0.0.9.whl
نصب پکیج tar.gz mongomock-motor-0.0.9:
pip install mongomock-motor-0.0.9.tar.gz