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.16.tar.gz
(4.1 kB
view hashes)
Built Distributions
Close
Hashes for mongomock_motor-0.0.16-py3.10.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2922120200a91fc8829e2ac00a7e6e850cf5d36f9feffd9e2b07fdf506779054 |
|
MD5 | 26cbb517dfd52bea71caad9f4afadefa |
|
BLAKE2b-256 | d9b7f2238c1b5e61d511ca8016ccbf5b28d02660bb65d5db8207853971ef6488 |
Close
Hashes for mongomock_motor-0.0.16-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99167a0aac678cd5fe5546e8fb9871c9414dbf16a2bc64473ff0c2076aff0106 |
|
MD5 | b568e12fbdfeb9522d043b69e21b2747 |
|
BLAKE2b-256 | 93fd3aa16ed51fc4a5c8d95bf183c304eca2b7a4dcf0766db01e555bd76f5cba |