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.25.tar.gz
(8.2 kB
view hashes)
Built Distribution
Close
Hashes for mongomock_motor-0.0.25-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76f244a5ed9f3bbd5375c64141588b3ac8fe0a3547662ae1e261dad611fe929a |
|
MD5 | 386324e164eeb8fd9e05e8fa441f287f |
|
BLAKE2b-256 | 5d609df0f80221bfa7526654f66ef56c5e396e65b6893dc7887688b8a1f8f021 |