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.15.tar.gz
(7.3 kB
view hashes)
Built Distributions
mongomock_motor-0.0.15-py3.10.egg
(26.3 kB
view hashes)
Close
Hashes for mongomock_motor-0.0.15-py3.10.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5520c5326b97b9c92e82c42e68378357d473200b885347de2363f29e50059349 |
|
MD5 | d2d48b9aa2a8ef98189ba2c99a47630b |
|
BLAKE2b-256 | 0f283de60225576c7611eda4b06776176ccb26dc02e6c5f1c095f18a5c50e54a |
Close
Hashes for mongomock_motor-0.0.15-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a8addb147de4412b8ca73961c2dbdd19f6ed44fba81e1c2504c7a265c87ad2a |
|
MD5 | 2cb5fc3eeb0b4133820825c8fdabf636 |
|
BLAKE2b-256 | 3d6cbf4f6678e74a79b6ed0d91462527696a8a7f720978aff5fb758390241fd3 |