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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mongomock_motor-0.0.36-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mongomock_motor-0.0.36.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.11.12 Linux/6.11.0-1012-azure

File hashes

Hashes for mongomock_motor-0.0.36.tar.gz
Algorithm Hash digest
SHA256 3cf62352ece5af2f02e04d2f252393f88b5fe0487997da00584020cee4b8efba
MD5 508f6f11e7c5cdf7836de9d7b724b391
BLAKE2b-256 189f38e42a34ebad323addaf6296d6b5d83eaf2c423adf206b757c68315e196a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mongomock_motor-0.0.36-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.11.12 Linux/6.11.0-1012-azure

File hashes

Hashes for mongomock_motor-0.0.36-py3-none-any.whl
Algorithm Hash digest
SHA256 3ecb7949662b8986ff9c267fa0b1402b5b75a6afd57f03850cd6e13a067e3691
MD5 fa25568b57a7469e0474682bfcfcb025
BLAKE2b-256 d699f5fdbbdc96bfd03e5f9c36339547a9076f5dbb5882900b7621526d41a38d

See more details on using hashes here.

Supported by

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