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.7.tar.gz
(4.5 kB
view hashes)
Built Distributions
mongomock_motor-0.0.7-py3.8.egg
(12.9 kB
view hashes)
Close
Hashes for mongomock_motor-0.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46631675664a158c5dc3ed56706299af8d8aaf01b8bc30269c110f626999eb42 |
|
MD5 | 8ee31def6377566b3bbfbc3ce811d0f9 |
|
BLAKE2b-256 | b3d44142eef77a0ac67a6d6efbd643f75b9bb196d3151ee03fbf5dbb1ba9bea6 |