Library for mocking AsyncIOMotorClient built on top of mongomock.
Project description
mongomock-motor
Best effort mock for AsyncIOMotorClient (Database, Collection, e.t.c) built on top of mongomock library.
Example / Showcase
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mongomock_motor-0.0.31.tar.gz
(10.3 kB
view details)
Built Distribution
File details
Details for the file mongomock_motor-0.0.31.tar.gz
.
File metadata
- Download URL: mongomock_motor-0.0.31.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1d6ccb7a8a7b9722d4ce348865a4a50ef5f6cb1552ce4f2178702635becd121 |
|
MD5 | 4de17b8dcdfb587154103529ea669efb |
|
BLAKE2b-256 | eba2906b7ddb72c77b059d3f5084988d343d05315b9d6cdd7b2d3e2f87bf3ac2 |
Provenance
File details
Details for the file mongomock_motor-0.0.31-py3-none-any.whl
.
File metadata
- Download URL: mongomock_motor-0.0.31-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02628993b06e1829975bb790306c98ca01f5bec3973d3982c6f58ab2401c5c17 |
|
MD5 | 61b846cc86c8fae5fe5e6b76f070fcd0 |
|
BLAKE2b-256 | fc55479ff2ea6fc5a37b5e2d571db57a2b0fe42b1fd7da7688306f847696b60f |