Library for mocking AsyncIOMotorClient built on top of mongomock.
Project description
mongomock-motor
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
Built Distribution
Close
Hashes for mongomock_motor-0.0.1.dev0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9e212b004bd5eaeabc3309c73604d95322f68db36ff7501c4ec650bf754bdfd |
|
MD5 | 2b0c4d9d3836ec803dfd369376a9d2e2 |
|
BLAKE2b-256 | 8f664a079c456c0076e85dd1ec2ee3dad4d793cf977c8cd8d868094b46319454 |
Close
Hashes for mongomock_motor-0.0.1.dev0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bba6d63b017c164948ac5b5350799b77cc1c0b34fe00ea9b6e75de158d4aed46 |
|
MD5 | 3094acff4e8ad36fe359181b41b4e943 |
|
BLAKE2b-256 | f0f37134c2e4179f0708c8e56c91587424cdd5459ccfc0eefd330604bdcc3caf |