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
Close
Hashes for mongomock_motor-0.0.24.dev1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3cd8d4c0561b6e591f164a98f74ba92a04fc36b835bd44487d4ce11d136c7ff5 |
|
MD5 | 8277d5d9b09f67d458134d2aac03da65 |
|
BLAKE2b-256 | 7628cfc89bb1198c1d3abf8a60f6904214fb9e6587d61dbb257b4f33323d1b25 |
Close
Hashes for mongomock_motor-0.0.24.dev1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b56ce275e0408915332e7c04b276adf6671d217cf792165cb8632d61137cf06 |
|
MD5 | d1caea818f6dd2c444cb1f86075d19e4 |
|
BLAKE2b-256 | 0d17d3975fae81cb53a878d961f0b8b488911ed2b03cb6835b894cc5b94513bc |