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.11.tar.gz
(6.4 kB
view hashes)
Built Distributions
mongomock_motor-0.0.11-py3.8.egg
(22.3 kB
view hashes)
Close
Hashes for mongomock_motor-0.0.11-py3.8.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b80d20319497d8989ea126d3c9810e712f54c5a36c445c2186108f4d8559348 |
|
MD5 | e92541fcfb6469929a360733e91f9de0 |
|
BLAKE2b-256 | 8a0e9fe8c6b2a6ce57155f49f14e6f17258054d8dd3b4fd102051efbf481ee99 |
Close
Hashes for mongomock_motor-0.0.11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4db0250aa7c3f63d4cce252ee81d014c1ba3ddc727dd5941bb6085b3a21504fe |
|
MD5 | 4bea50903303c6a30ebfadd22f481fd1 |
|
BLAKE2b-256 | bbd98b512de7037b44f407304511b09c7504a3a4f61c9228fae4618cf6de3d12 |