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

Uploaded Source

Built Distribution

mongomock_motor-0.0.25-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mongomock_motor-0.0.25.tar.gz
  • Upload date:
  • Size: 8.2 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.25.tar.gz
Algorithm Hash digest
SHA256 8202ec8071984494d04f412d0e1f9ef87c3a066e10ed2ad4e8d71073b6950adf
MD5 57c83cf1579fd2c4feb9606c8222e318
BLAKE2b-256 ed323161cda3f0758792ca26a6dd9ce141c4c6ba57db249150f83bffc4df20d4

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for mongomock_motor-0.0.25-py3-none-any.whl
Algorithm Hash digest
SHA256 76f244a5ed9f3bbd5375c64141588b3ac8fe0a3547662ae1e261dad611fe929a
MD5 386324e164eeb8fd9e05e8fa441f287f
BLAKE2b-256 5d609df0f80221bfa7526654f66ef56c5e396e65b6893dc7887688b8a1f8f021

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