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.24.dev1.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

mongomock_motor-0.0.24.dev1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file mongomock_motor-0.0.24.dev1.tar.gz.

File metadata

  • Download URL: mongomock_motor-0.0.24.dev1.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for mongomock_motor-0.0.24.dev1.tar.gz
Algorithm Hash digest
SHA256 3cd8d4c0561b6e591f164a98f74ba92a04fc36b835bd44487d4ce11d136c7ff5
MD5 8277d5d9b09f67d458134d2aac03da65
BLAKE2b-256 7628cfc89bb1198c1d3abf8a60f6904214fb9e6587d61dbb257b4f33323d1b25

See more details on using hashes here.

Provenance

File details

Details for the file mongomock_motor-0.0.24.dev1-py3-none-any.whl.

File metadata

File hashes

Hashes for mongomock_motor-0.0.24.dev1-py3-none-any.whl
Algorithm Hash digest
SHA256 7b56ce275e0408915332e7c04b276adf6671d217cf792165cb8632d61137cf06
MD5 d1caea818f6dd2c444cb1f86075d19e4
BLAKE2b-256 0d17d3975fae81cb53a878d961f0b8b488911ed2b03cb6835b894cc5b94513bc

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