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.10-py3.8.egg
(22.3 kB
view details)
File details
Details for the file mongomock_motor-0.0.10.tar.gz
.
File metadata
- Download URL: mongomock_motor-0.0.10.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 | 55ea6609d1c789679f281e2c60677b6b55157cea63f0972d45789051238a0407 |
|
MD5 | 29c408a6271c2588263454bac30b0b86 |
|
BLAKE2b-256 | c4276824e59aa5060c9823f799423a1ba0ae868f7ec0d0e69e854d0881ea76ae |
Provenance
File details
Details for the file mongomock_motor-0.0.10-py3.8.egg
.
File metadata
- Download URL: mongomock_motor-0.0.10-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 | 036f5419669c8427817bf2947d86fbf041d80c163fc539df3b3a544d9ce91152 |
|
MD5 | 78d0b00876e79e81400657c1b466e7e4 |
|
BLAKE2b-256 | f7c0c35ef8be27e2a53294dc4397094f457d79c98b8b402b3b5c8d14b5af9fc7 |
Provenance
File details
Details for the file mongomock_motor-0.0.10-py3-none-any.whl
.
File metadata
- Download URL: mongomock_motor-0.0.10-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 | 90e6d41ff09add9e2f98ea0a2c4776020077ee7534799116a8a2de8de44206a5 |
|
MD5 | 74aa4f011cb9c3e6a3ffce2ef16a1fef |
|
BLAKE2b-256 | 9168e456143e7b6803ab19169ec85337d158c08ba76db2bfb1f307a3af9bc82b |