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
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.3.tar.gz
(3.5 kB
view hashes)
Built Distributions
Close
Hashes for mongomock_motor-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32a0dc6c6d6c90c3c42b2e27fa77a100699c104bf0acc9f6b0ee1b357d4b2143 |
|
MD5 | d7110092e30f0f389b49359db9d8e83a |
|
BLAKE2b-256 | 77b4928275574ec20ddcf1d78ec3fb2a5dadbad614340bc2f15d872265624766 |