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

Uploaded Source

Built Distributions

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

Uploaded Source

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mongomock_motor-0.0.20.tar.gz
Algorithm Hash digest
SHA256 f708073db304ebee95bfd37ea9ef93019196082cd11dd5e61d34c9e8be213521
MD5 29862969e4650b81e388bb962812412f
BLAKE2b-256 c8f74487346431874d07b14a05e2945dea09ce9e4f294d9cbe103f64907fbc03

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: mongomock_motor-0.0.20-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.12

File hashes

Hashes for mongomock_motor-0.0.20-py3.10.egg
Algorithm Hash digest
SHA256 04cb8b481ffddf4213c0ac55721ae0854229062375ecef76e0ebbad20068a551
MD5 e532a1391f549c9c7de65870fa3c9cec
BLAKE2b-256 c12948c287e6a351a84dcc8e9e3e31c6f6b0836dd6193005b34628c508723a7f

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for mongomock_motor-0.0.20-py3-none-any.whl
Algorithm Hash digest
SHA256 908bc8f969ced87e11e2c526b3f215d51410c28148cc7374d0ee285d64c98d91
MD5 f04ab43dce1368eee2fe0c134e341469
BLAKE2b-256 14d5a4d5ba73a7e390df732b76e10d20b9fc6b667c76eb6a6007ccaef2429853

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