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.2.tar.gz
(3.4 kB
view hashes)
Built Distributions
Close
Hashes for mongomock_motor-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e71b881fb4ec14dc4bef14b70ff62e57ea84d0c881fc4f3ace5c72131ec9451 |
|
MD5 | ab30f552ba7ad21525da411fedf2a825 |
|
BLAKE2b-256 | e4a3e57f84924521b8c9253a129c125995c33d95534effceb95024c90cb80fad |