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
Built Distributions
mongomock_motor-0.0.11-py3.8.egg
(22.3 kB
view details)
File details
Details for the file mongomock_motor-0.0.11.tar.gz
.
File metadata
- Download URL: mongomock_motor-0.0.11.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6793ded636091561718fad3ff4f715d78daf6f093dc8d2ad994ac74055c807d |
|
MD5 | fc60bfdf54d352001ad03e8367374197 |
|
BLAKE2b-256 | 19ec20152207f8c704752baaaa59feb2e2d5fb9207dcecae8b3b406649dfe7ed |
Provenance
File details
Details for the file mongomock_motor-0.0.11-py3.8.egg
.
File metadata
- Download URL: mongomock_motor-0.0.11-py3.8.egg
- Upload date:
- Size: 22.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b80d20319497d8989ea126d3c9810e712f54c5a36c445c2186108f4d8559348 |
|
MD5 | e92541fcfb6469929a360733e91f9de0 |
|
BLAKE2b-256 | 8a0e9fe8c6b2a6ce57155f49f14e6f17258054d8dd3b4fd102051efbf481ee99 |
Provenance
File details
Details for the file mongomock_motor-0.0.11-py3-none-any.whl
.
File metadata
- Download URL: mongomock_motor-0.0.11-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4db0250aa7c3f63d4cce252ee81d014c1ba3ddc727dd5941bb6085b3a21504fe |
|
MD5 | 4bea50903303c6a30ebfadd22f481fd1 |
|
BLAKE2b-256 | bbd98b512de7037b44f407304511b09c7504a3a4f61c9228fae4618cf6de3d12 |