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.12-py3.8.egg
(23.1 kB
view details)
File details
Details for the file mongomock_motor-0.0.12.tar.gz
.
File metadata
- Download URL: mongomock_motor-0.0.12.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55dbf7bd76f4885c48fc48aa3a1de75d9e8fd2f5570ebb5e80316c621c260a1f |
|
MD5 | 2920e1fd94e2009a56560224e4435681 |
|
BLAKE2b-256 | e38ef4a5ed01a7facd08e79a47fb090d3965b0b79819f0c66e08ce84c47e79f6 |
Provenance
File details
Details for the file mongomock_motor-0.0.12-py3.8.egg
.
File metadata
- Download URL: mongomock_motor-0.0.12-py3.8.egg
- Upload date:
- Size: 23.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a1d4402f961385d19b5d676338256016cfb9907c01058b8f03dfcf5b5231570 |
|
MD5 | 43acbc7cb3a8034e37cb17801819695e |
|
BLAKE2b-256 | 8df6ffd222578f0b7a8bcda887fe6fc879f0a6f2d2fa44101f0a1c4e872820a3 |
Provenance
File details
Details for the file mongomock_motor-0.0.12-py3-none-any.whl
.
File metadata
- Download URL: mongomock_motor-0.0.12-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2e27fe2ad0c1376922579abed0011fb32c4c022f57db85cefad5f6b02ffe055 |
|
MD5 | a26cda0d10790c14814b87c689437901 |
|
BLAKE2b-256 | fd6bebb1314fc5b619f7c338709d426d4910184cf77825b2cad0f95bec6cc52a |