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.29.tar.gz
(10.0 kB
view details)
Built Distribution
File details
Details for the file mongomock_motor-0.0.29.tar.gz
.
File metadata
- Download URL: mongomock_motor-0.0.29.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a16c5746fad48ba5bce37aecd27729343e58e66f91652a94c0659d7f9dac4302 |
|
MD5 | dbc149090dd7cf2dd26e146a78cd199e |
|
BLAKE2b-256 | e2f29e5d09d4c4241e45c3cdce9949d4400f064964523d36e0f7ad8770dc0156 |
Provenance
File details
Details for the file mongomock_motor-0.0.29-py3-none-any.whl
.
File metadata
- Download URL: mongomock_motor-0.0.29-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 600c2f6f7c6857691b3a75fb74b22b881ab69cc992bb00296bfe5811e3470bae |
|
MD5 | 2ca9cb20e242b6ddb2b6a2a06a234ff3 |
|
BLAKE2b-256 | e66a97a8e494fe52f9690e1571759490ec118bd7cf4616b141d3696c6c5bb86c |