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.34.tar.gz
.
File metadata
- Download URL: mongomock_motor-0.0.34.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.9 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8141ff9bf41ca19b87a935855013018a726ac3d2fbd74a14bbc71ce34a532d0 |
|
MD5 | 92c97f9e69ee760f885652eebd3987c4 |
|
BLAKE2b-256 | 664d375b4112b4c08fbb58186fde9220dcdbac10755f9e2ed7bd39f7d4308691 |
File details
Details for the file mongomock_motor-0.0.34-py3-none-any.whl
.
File metadata
- Download URL: mongomock_motor-0.0.34-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.9 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f14b131cbbaae26104c4e5c3e7d70452ab743b284fd52fc10fac668e9c6b0575 |
|
MD5 | 4e88be01d53c7536fb0bb063ba2d8509 |
|
BLAKE2b-256 | cbaf21377db03f0536950179ec6eedb4b72bb8eaa3e6cb7d3a1c8bf13f221a53 |