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.10.tar.gz
(6.4 kB
view hashes)
Built Distributions
mongomock_motor-0.0.10-py3.8.egg
(22.3 kB
view hashes)
Close
Hashes for mongomock_motor-0.0.10-py3.8.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 036f5419669c8427817bf2947d86fbf041d80c163fc539df3b3a544d9ce91152 |
|
MD5 | 78d0b00876e79e81400657c1b466e7e4 |
|
BLAKE2b-256 | f7c0c35ef8be27e2a53294dc4397094f457d79c98b8b402b3b5c8d14b5af9fc7 |
Close
Hashes for mongomock_motor-0.0.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90e6d41ff09add9e2f98ea0a2c4776020077ee7534799116a8a2de8de44206a5 |
|
MD5 | 74aa4f011cb9c3e6a3ffce2ef16a1fef |
|
BLAKE2b-256 | 9168e456143e7b6803ab19169ec85337d158c08ba76db2bfb1f307a3af9bc82b |