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.13.tar.gz
(6.7 kB
view hashes)
Built Distributions
mongomock_motor-0.0.13-py3.8.egg
(23.4 kB
view hashes)
Close
Hashes for mongomock_motor-0.0.13-py3.8.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35f3f0068b93ff7e03535090dd5f8c69430b0f6be3dc421793d82a46ac29af35 |
|
MD5 | f361be536b04cd5d720056017d9275d7 |
|
BLAKE2b-256 | 647fec574ceca3f6ac4a01c2e62b4b8a5d327ab8ae888d1372f822a7a02cfe66 |
Close
Hashes for mongomock_motor-0.0.13-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 724f58c57b4aef297e989fcf824aa2b183a779af7c149a1bd40fbcd465b83144 |
|
MD5 | 7ba78bf70610cd1c43438950726f3a73 |
|
BLAKE2b-256 | 23b3a47063afe678b7d6b456649ac65ff35ab1ed14a9c8b7a52064774489174c |