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.18.tar.gz
(7.6 kB
view hashes)
Built Distributions
Close
Hashes for mongomock_motor-0.0.18-py3.10.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0de5b0d01cb5a9290b449128667435702d7c9be3c73d3524ba80109a1abe671b |
|
MD5 | ab42dd0e7dacfc743ad9cdc3b2992ccb |
|
BLAKE2b-256 | e3d1fbcb0df352eb277a83ebffd89e768ee7d6c2a2ef3caa2b08c31958d47535 |
Close
Hashes for mongomock_motor-0.0.18-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87e9678ab459f868d4e4207b631c0abb932e6f33a98f81c516ca0d73a8cb0d2c |
|
MD5 | a6728b9a6c3a38a3dab3a27761b65088 |
|
BLAKE2b-256 | 673fa9b06fef01460e98749e1afd1baaf1ff5e501cf670578a2c0b89cf09fd37 |