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.14.tar.gz
(7.1 kB
view hashes)
Built Distributions
mongomock_motor-0.0.14-py3.10.egg
(25.4 kB
view hashes)
Close
Hashes for mongomock_motor-0.0.14-py3.10.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64f726ee8a71bee925d377be1ce588819636ca6d47c1929806fb76f6d715bdd2 |
|
MD5 | 7661ff14e6dfd5d8439792f7dd734b46 |
|
BLAKE2b-256 | 87c71d97c077c86b066197a24bfdfcf5c3cc54d62bc7adf0920cc5eaf947e0da |
Close
Hashes for mongomock_motor-0.0.14-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 901f2f8673a09e75c8b5e3348ba429620c9508e624de2ee7a7f429b3a6887a64 |
|
MD5 | 13ec4ccd5cee3be178db82a3676cde22 |
|
BLAKE2b-256 | d72d5fe6a968835ec8d0f90447164af261ba48922b6871a53cbfc5e4a5c0e3ed |