mongomock-motor


Namemongomock-motor JSON
Version 0.0.29 PyPI version JSON
download
home_pagehttps://github.com/michaelkryukov/mongomock_motor
SummaryLibrary for mocking AsyncIOMotorClient built on top of mongomock.
upload_time2024-03-14 13:13:36
maintainer
docs_urlNone
authorMichael Krukov
requires_python>=3.6
license
keywords library mongodb
VCS
bugtrack_url
requirements mongomock anyio beanie Mongo-Thingy pytest ruff umongo
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "library,mongodb",
    "author": "Michael Krukov",
    "author_email": "krukov.michael@ya.ru",
    "download_url": "https://files.pythonhosted.org/packages/e2/f2/9e5d09d4c4241e45c3cdce9949d4400f064964523d36e0f7ad8770dc0156/mongomock_motor-0.0.29.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": "",
    "summary": "Library for mocking AsyncIOMotorClient built on top of mongomock.",
    "version": "0.0.29",
    "project_urls": {
        "Homepage": "https://github.com/michaelkryukov/mongomock_motor"
    },
    "split_keywords": [
        "library",
        "mongodb"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e66a97a8e494fe52f9690e1571759490ec118bd7cf4616b141d3696c6c5bb86c",
                "md5": "2ca9cb20e242b6ddb2b6a2a06a234ff3",
                "sha256": "600c2f6f7c6857691b3a75fb74b22b881ab69cc992bb00296bfe5811e3470bae"
            },
            "downloads": -1,
            "filename": "mongomock_motor-0.0.29-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2ca9cb20e242b6ddb2b6a2a06a234ff3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 5958,
            "upload_time": "2024-03-14T13:13:35",
            "upload_time_iso_8601": "2024-03-14T13:13:35.029878Z",
            "url": "https://files.pythonhosted.org/packages/e6/6a/97a8e494fe52f9690e1571759490ec118bd7cf4616b141d3696c6c5bb86c/mongomock_motor-0.0.29-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e2f29e5d09d4c4241e45c3cdce9949d4400f064964523d36e0f7ad8770dc0156",
                "md5": "dbc149090dd7cf2dd26e146a78cd199e",
                "sha256": "a16c5746fad48ba5bce37aecd27729343e58e66f91652a94c0659d7f9dac4302"
            },
            "downloads": -1,
            "filename": "mongomock_motor-0.0.29.tar.gz",
            "has_sig": false,
            "md5_digest": "dbc149090dd7cf2dd26e146a78cd199e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 9990,
            "upload_time": "2024-03-14T13:13:36",
            "upload_time_iso_8601": "2024-03-14T13:13:36.112393Z",
            "url": "https://files.pythonhosted.org/packages/e2/f2/9e5d09d4c4241e45c3cdce9949d4400f064964523d36e0f7ad8770dc0156/mongomock_motor-0.0.29.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-14 13:13:36",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "michaelkryukov",
    "github_project": "mongomock_motor",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "mongomock",
            "specs": [
                [
                    "~=",
                    "4.1.2"
                ]
            ]
        },
        {
            "name": "anyio",
            "specs": [
                [
                    "~=",
                    "3.5.0"
                ]
            ]
        },
        {
            "name": "beanie",
            "specs": [
                [
                    "~=",
                    "1.21.0"
                ]
            ]
        },
        {
            "name": "Mongo-Thingy",
            "specs": [
                [
                    "~=",
                    "0.15.1"
                ]
            ]
        },
        {
            "name": "pytest",
            "specs": [
                [
                    "~=",
                    "7.0.0"
                ]
            ]
        },
        {
            "name": "ruff",
            "specs": [
                [
                    "~=",
                    "0.2.0"
                ]
            ]
        },
        {
            "name": "umongo",
            "specs": [
                [
                    "~=",
                    "3.1.0"
                ]
            ]
        }
    ],
    "lcname": "mongomock-motor"
}
        
Elapsed time: 0.32189s