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.19.tar.gz
(7.7 kB
view hashes)
Built Distributions
Close
Hashes for mongomock_motor-0.0.19-py3.10.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd1adb6d137d31337bb108097807687c2a09ce5dcaa497cedc4876a1f32fffd3 |
|
MD5 | 3c7c412709ec7872e2b39c10a0e751db |
|
BLAKE2b-256 | 2b8858c513b75da611e3a53457b7d29ea337401789a9b4fee1412716b951635c |
Close
Hashes for mongomock_motor-0.0.19-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 954444de0a6371acbd45b0ecad6a9daab99e0e652c863d15a65189a196201cc5 |
|
MD5 | 18d847bff747b484e52e997cad612bb6 |
|
BLAKE2b-256 | c1723f83d7a581b625f488aa1356aca1c9355734a199c3542af149d04158f4a2 |