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
Built Distribution
File details
Details for the file mongomock_motor-0.0.25.tar.gz
.
File metadata
- Download URL: mongomock_motor-0.0.25.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8202ec8071984494d04f412d0e1f9ef87c3a066e10ed2ad4e8d71073b6950adf |
|
MD5 | 57c83cf1579fd2c4feb9606c8222e318 |
|
BLAKE2b-256 | ed323161cda3f0758792ca26a6dd9ce141c4c6ba57db249150f83bffc4df20d4 |
Provenance
File details
Details for the file mongomock_motor-0.0.25-py3-none-any.whl
.
File metadata
- Download URL: mongomock_motor-0.0.25-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76f244a5ed9f3bbd5375c64141588b3ac8fe0a3547662ae1e261dad611fe929a |
|
MD5 | 386324e164eeb8fd9e05e8fa441f287f |
|
BLAKE2b-256 | 5d609df0f80221bfa7526654f66ef56c5e396e65b6893dc7887688b8a1f8f021 |