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.8.tar.gz
(5.5 kB
view details)
Built Distributions
mongomock_motor-0.0.8-py3.8.egg
(17.8 kB
view details)
File details
Details for the file mongomock_motor-0.0.8.tar.gz
.
File metadata
- Download URL: mongomock_motor-0.0.8.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca6a3a266b3ed5424d8b3a287ca4b3bdf87e199205c9b0c61385e3df19415eac |
|
MD5 | ab1b9ac3c6a7cb9915b2d9691250d8af |
|
BLAKE2b-256 | f1c22229a441be05bf7504619796f5e75c2ca6edfae90af06c946a72d8c72d70 |
Provenance
File details
Details for the file mongomock_motor-0.0.8-py3.8.egg
.
File metadata
- Download URL: mongomock_motor-0.0.8-py3.8.egg
- Upload date:
- Size: 17.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b06a1adadc767d70f3798adbe506fc39252eae8efcb308d04736235dff85d5f |
|
MD5 | 16d2c88f40f4ee927ad67e6f907fc4bb |
|
BLAKE2b-256 | 5c1e41eb7bd9446fdb3c068776b7842c5ff9802ffd773fe58d93d077406a91ce |
Provenance
File details
Details for the file mongomock_motor-0.0.8-py3-none-any.whl
.
File metadata
- Download URL: mongomock_motor-0.0.8-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eea755be6a0ba9b6404f421a1c3888a1b31e5b317ce6ce45651fbaf4bd0bedb4 |
|
MD5 | a4e7e658afe58dfbf452ecdf027f5745 |
|
BLAKE2b-256 | ddfb2bb04e67c62f6ac94d1f617a23aa90d70f7dcef832d7b5fd9c128d37ed98 |