Skip to main content

Best effort mock for AsyncIOMotorClient built on top of mongomock library.

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

Uploaded Source

Built Distribution

mongomock_motor-0.0.32-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mongomock_motor-0.0.32.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.9 Linux/6.5.0-1025-azure

File hashes

Hashes for mongomock_motor-0.0.32.tar.gz
Algorithm Hash digest
SHA256 91c0726f8675461367fbf36bd2abd6cb3ffcf724e39b8bce7468dacdfe0e7de9
MD5 2c83b4c6dd13846d804b04d17be27768
BLAKE2b-256 1ad0b1f5363d897c83aadc53bbe1b03914fe1993c23ba878de7d0fabb568e2ac

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: mongomock_motor-0.0.32-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.9 Linux/6.5.0-1025-azure

File hashes

Hashes for mongomock_motor-0.0.32-py3-none-any.whl
Algorithm Hash digest
SHA256 723609380cfc98c6211d7343fe86b149e850e7491d00cf0110766a6362288c2a
MD5 3e7dea3616f56245009c743f084b16d2
BLAKE2b-256 560a6027e3b40ca57c402da2bbc09ad04312c95bab9339dc82e6508e38a9c05a

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