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

Uploaded Source

Built Distributions

mongomock_motor-0.0.15-py3.10.egg (26.3 kB view details)

Uploaded Source

mongomock_motor-0.0.15-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mongomock_motor-0.0.15.tar.gz
  • Upload date:
  • Size: 7.3 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.15.tar.gz
Algorithm Hash digest
SHA256 8b2bd8bc42ff7c9bccc15c1fe74fa350c753d93e13ba3e7adf666701077e4b33
MD5 e8ddee302ccbc10a447be37f68d62458
BLAKE2b-256 5c8b5666460e73d87ec0909d85830d5ed44eff2986cf01a5da223119f3cf3fd3

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: mongomock_motor-0.0.15-py3.10.egg
  • Upload date:
  • Size: 26.3 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.15-py3.10.egg
Algorithm Hash digest
SHA256 5520c5326b97b9c92e82c42e68378357d473200b885347de2363f29e50059349
MD5 d2d48b9aa2a8ef98189ba2c99a47630b
BLAKE2b-256 0f283de60225576c7611eda4b06776176ccb26dc02e6c5f1c095f18a5c50e54a

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for mongomock_motor-0.0.15-py3-none-any.whl
Algorithm Hash digest
SHA256 7a8addb147de4412b8ca73961c2dbdd19f6ed44fba81e1c2504c7a265c87ad2a
MD5 2cb5fc3eeb0b4133820825c8fdabf636
BLAKE2b-256 3d6cbf4f6678e74a79b6ed0d91462527696a8a7f720978aff5fb758390241fd3

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