Skip to main content

Library for mocking AsyncIOMotorClient built on top of mongomock.

Project description

mongomock-motor

PyPI version FOSSA Status

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

FOSSA Status

Project details


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.27.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

mongomock_motor-0.0.27-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file mongomock_motor-0.0.27.tar.gz.

File metadata

  • Download URL: mongomock_motor-0.0.27.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for mongomock_motor-0.0.27.tar.gz
Algorithm Hash digest
SHA256 b400d2b3f506620de73d867d65247827700cd95cdf6e2812dd44ad9bc1418567
MD5 37a56b245803f635eb5fd8bc30a8e758
BLAKE2b-256 f1dfbf0d70815a98a1ca263913698bbed607a062fdfe90af27fdd81978317f71

See more details on using hashes here.

Provenance

File details

Details for the file mongomock_motor-0.0.27-py3-none-any.whl.

File metadata

File hashes

Hashes for mongomock_motor-0.0.27-py3-none-any.whl
Algorithm Hash digest
SHA256 9272053ffe8e4ed7e34e4e2945b1ebe5f28f6de291d226625652db80548134d6
MD5 e337d198dc03043c9234e58f3eccb761
BLAKE2b-256 6c88dd2980315ac4bcd3cd3473a0ece0f56db81b6058833973b029870db16b11

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page