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
Built Distribution
File details
Details for the file mongomock_motor-0.0.26.tar.gz
.
File metadata
- Download URL: mongomock_motor-0.0.26.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a2ce04e8280e6a1a334d8950969aafe0ab57b47d41882feb1d4e2a3ce7f0039 |
|
MD5 | 50e65275e62e02ab55cda164b932f592 |
|
BLAKE2b-256 | 9dfb23ebc269249c5a713239e60826b61dac03cc832119dcec972f162ac7562a |
Provenance
File details
Details for the file mongomock_motor-0.0.26-py3-none-any.whl
.
File metadata
- Download URL: mongomock_motor-0.0.26-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc193b5d79fc773cf823f056fc6ec91e09df93f6423ac73c1e597641adc096a4 |
|
MD5 | 5454a842ba5e1c7797d9e768e6bfc0e4 |
|
BLAKE2b-256 | 5eaed2a733b7270361df1309292f31e5ab00c34666b1332138e4273738b0b99f |