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

Uploaded Source

Built Distributions

mongomock_motor-0.0.18-py3.10.egg (9.9 kB view details)

Uploaded Source

mongomock_motor-0.0.18-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mongomock_motor-0.0.18.tar.gz
Algorithm Hash digest
SHA256 5d34aba038f133abd21ba3b4e1bb913aeeb0d7bf96264781c60a51336ee5b841
MD5 17bb3e884f78d3b72300e6cc6c84bff2
BLAKE2b-256 e3817109b79d3ba292afc4a211697b44128a29786059589f014a8394c1e7923c

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for mongomock_motor-0.0.18-py3.10.egg
Algorithm Hash digest
SHA256 0de5b0d01cb5a9290b449128667435702d7c9be3c73d3524ba80109a1abe671b
MD5 ab42dd0e7dacfc743ad9cdc3b2992ccb
BLAKE2b-256 e3d1fbcb0df352eb277a83ebffd89e768ee7d6c2a2ef3caa2b08c31958d47535

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for mongomock_motor-0.0.18-py3-none-any.whl
Algorithm Hash digest
SHA256 87e9678ab459f868d4e4207b631c0abb932e6f33a98f81c516ca0d73a8cb0d2c
MD5 a6728b9a6c3a38a3dab3a27761b65088
BLAKE2b-256 673fa9b06fef01460e98749e1afd1baaf1ff5e501cf670578a2c0b89cf09fd37

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