Skip to main content

Library for mocking AsyncIOMotorClient built on top of mongomock.

Project description

mongomock-motor

PyPI version

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

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

Uploaded Source

Built Distributions

mongomock_motor-0.0.14-py3.10.egg (25.4 kB view details)

Uploaded Source

mongomock_motor-0.0.14-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mongomock_motor-0.0.14.tar.gz
Algorithm Hash digest
SHA256 8b0549a7302a1a4c31f2a0a19c27f7b5d83897447bc2fdf9f6a677d872e1aef9
MD5 b5797b24f931e33748178539b83b0b7f
BLAKE2b-256 3cf6e0a64ed01644b8e5d6dcd6c55659cd1a7e8947cfbe1aefeea12a2ce10e76

See more details on using hashes here.

Provenance

File details

Details for the file mongomock_motor-0.0.14-py3.10.egg.

File metadata

  • Download URL: mongomock_motor-0.0.14-py3.10.egg
  • Upload date:
  • Size: 25.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for mongomock_motor-0.0.14-py3.10.egg
Algorithm Hash digest
SHA256 64f726ee8a71bee925d377be1ce588819636ca6d47c1929806fb76f6d715bdd2
MD5 7661ff14e6dfd5d8439792f7dd734b46
BLAKE2b-256 87c71d97c077c86b066197a24bfdfcf5c3cc54d62bc7adf0920cc5eaf947e0da

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for mongomock_motor-0.0.14-py3-none-any.whl
Algorithm Hash digest
SHA256 901f2f8673a09e75c8b5e3348ba429620c9508e624de2ee7a7f429b3a6887a64
MD5 13ec4ccd5cee3be178db82a3676cde22
BLAKE2b-256 d72d5fe6a968835ec8d0f90447164af261ba48922b6871a53cbfc5e4a5c0e3ed

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