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.17.tar.gz
(4.1 kB
view hashes)
Built Distributions
Close
Hashes for mongomock_motor-0.0.17-py3.10.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff6ba455e78f70cd7243bcc9b7bd980519d1033fb47f0b62d41f6047a0297d4d |
|
MD5 | 2eede91e47d7cfc43c8c577a16c7f3a4 |
|
BLAKE2b-256 | e49c0cd668cc85c389b8a4b1d9822638689a4c1d05045fc74a9a71fb6db40f98 |
Close
Hashes for mongomock_motor-0.0.17-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64d703dd2e652928c2e40f930c1d0aee27aa4d11dcd34f55ac5c6951fec32386 |
|
MD5 | 07ff5a10b0a301bb9d45a961a4502827 |
|
BLAKE2b-256 | ba6208ff58db6f490908a7da8eba58c731a907f547b3cc903966c03705b66154 |