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
License
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.30.tar.gz
(10.0 kB
view details)
Built Distribution
File details
Details for the file mongomock_motor-0.0.30.tar.gz
.
File metadata
- Download URL: mongomock_motor-0.0.30.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7977413755f70c7ca306e407f5e0d1e49dfa428ce6f2551b097f4db59f8c285b |
|
MD5 | cc505393a9a57bcc51aac65be8ce8da9 |
|
BLAKE2b-256 | 12fbd541cc6ca4f31d7687c8ec9a7df1f12af6bfc8269d2c47e4cb8ce451f608 |
Provenance
File details
Details for the file mongomock_motor-0.0.30-py3-none-any.whl
.
File metadata
- Download URL: mongomock_motor-0.0.30-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5eb41488ce5825ebf1a1ddc90c6ff2c870b2d8506bd1096790408f53068f0ca6 |
|
MD5 | 3409311897c5d3b49d8e0cc8064e0ab3 |
|
BLAKE2b-256 | 72aac8ab31ecffa2579f765d14eb09a56db545b101bf4c387b539bb8b5fdd340 |