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.20.tar.gz
(7.9 kB
view hashes)
Built Distributions
Close
Hashes for mongomock_motor-0.0.20-py3.10.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04cb8b481ffddf4213c0ac55721ae0854229062375ecef76e0ebbad20068a551 |
|
MD5 | e532a1391f549c9c7de65870fa3c9cec |
|
BLAKE2b-256 | c12948c287e6a351a84dcc8e9e3e31c6f6b0836dd6193005b34628c508723a7f |
Close
Hashes for mongomock_motor-0.0.20-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 908bc8f969ced87e11e2c526b3f215d51410c28148cc7374d0ee285d64c98d91 |
|
MD5 | f04ab43dce1368eee2fe0c134e341469 |
|
BLAKE2b-256 | 14d5a4d5ba73a7e390df732b76e10d20b9fc6b667c76eb6a6007ccaef2429853 |