# mongomock-motor
[![PyPI version](https://badge.fury.io/py/mongomock-motor.svg)](https://badge.fury.io/py/mongomock-motor)
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fmichaelkryukov%2Fmongomock_motor.svg?type=shield)](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
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fmichaelkryukov%2Fmongomock_motor.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fmichaelkryukov%2Fmongomock_motor?ref=badge_large)
Raw data
{
"_id": null,
"home_page": "https://github.com/michaelkryukov/mongomock_motor",
"name": "mongomock-motor",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.8",
"maintainer_email": null,
"keywords": "library, mongodb",
"author": "Michael Kryukov",
"author_email": "kryukov.ms@ya.ru",
"download_url": "https://files.pythonhosted.org/packages/66/4d/375b4112b4c08fbb58186fde9220dcdbac10755f9e2ed7bd39f7d4308691/mongomock_motor-0.0.34.tar.gz",
"platform": null,
"description": "# mongomock-motor\n\n[![PyPI version](https://badge.fury.io/py/mongomock-motor.svg)](https://badge.fury.io/py/mongomock-motor)\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fmichaelkryukov%2Fmongomock_motor.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fmichaelkryukov%2Fmongomock_motor?ref=badge_shield)\n\nBest effort mock for [AsyncIOMotorClient](https://motor.readthedocs.io/en/stable/api-asyncio/asyncio_motor_client.html)\n(Database, Collection, e.t.c) built on top of [mongomock](https://github.com/mongomock/mongomock) library.\n\n## Example / Showcase\n\n```py\nfrom mongomock_motor import AsyncMongoMockClient\n\n\nasync def test_mock_client():\n collection = AsyncMongoMockClient()['tests']['test-1']\n\n assert await collection.find({}).to_list(None) == []\n\n result = await collection.insert_one({'a': 1})\n assert result.inserted_id\n\n assert len(await collection.find({}).to_list(None)) == 1\n```\n\n## License\n\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fmichaelkryukov%2Fmongomock_motor.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fmichaelkryukov%2Fmongomock_motor?ref=badge_large)\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Library for mocking AsyncIOMotorClient built on top of mongomock.",
"version": "0.0.34",
"project_urls": {
"Homepage": "https://github.com/michaelkryukov/mongomock_motor",
"Repository": "https://github.com/michaelkryukov/mongomock_motor"
},
"split_keywords": [
"library",
" mongodb"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "cbaf21377db03f0536950179ec6eedb4b72bb8eaa3e6cb7d3a1c8bf13f221a53",
"md5": "4e88be01d53c7536fb0bb063ba2d8509",
"sha256": "f14b131cbbaae26104c4e5c3e7d70452ab743b284fd52fc10fac668e9c6b0575"
},
"downloads": -1,
"filename": "mongomock_motor-0.0.34-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4e88be01d53c7536fb0bb063ba2d8509",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.8",
"size": 5852,
"upload_time": "2024-09-16T20:00:32",
"upload_time_iso_8601": "2024-09-16T20:00:32.679660Z",
"url": "https://files.pythonhosted.org/packages/cb/af/21377db03f0536950179ec6eedb4b72bb8eaa3e6cb7d3a1c8bf13f221a53/mongomock_motor-0.0.34-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "664d375b4112b4c08fbb58186fde9220dcdbac10755f9e2ed7bd39f7d4308691",
"md5": "92c97f9e69ee760f885652eebd3987c4",
"sha256": "c8141ff9bf41ca19b87a935855013018a726ac3d2fbd74a14bbc71ce34a532d0"
},
"downloads": -1,
"filename": "mongomock_motor-0.0.34.tar.gz",
"has_sig": false,
"md5_digest": "92c97f9e69ee760f885652eebd3987c4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8",
"size": 5050,
"upload_time": "2024-09-16T20:00:33",
"upload_time_iso_8601": "2024-09-16T20:00:33.769022Z",
"url": "https://files.pythonhosted.org/packages/66/4d/375b4112b4c08fbb58186fde9220dcdbac10755f9e2ed7bd39f7d4308691/mongomock_motor-0.0.34.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-16 20:00:33",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "michaelkryukov",
"github_project": "mongomock_motor",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "mongomock-motor"
}