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

Uploaded Source

Built Distributions

mongomock_motor-0.0.9-py3.8.egg (20.7 kB view details)

Uploaded Source

mongomock_motor-0.0.9-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mongomock_motor-0.0.9.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.12

File hashes

Hashes for mongomock_motor-0.0.9.tar.gz
Algorithm Hash digest
SHA256 955307b9d31f84c6f75d85bc130989947c11dd4ee85fc4dd3b1525fc0bcb82ef
MD5 c47864b0b2a35dba0efa23c36031c7e7
BLAKE2b-256 f17f6e0a504df18fa6cf757242a9c6d70b10e0fa916a02990d65a7fba92cf922

See more details on using hashes here.

Provenance

File details

Details for the file mongomock_motor-0.0.9-py3.8.egg.

File metadata

  • Download URL: mongomock_motor-0.0.9-py3.8.egg
  • Upload date:
  • Size: 20.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.12

File hashes

Hashes for mongomock_motor-0.0.9-py3.8.egg
Algorithm Hash digest
SHA256 981af4fa8e3c0aaf0b0f44027eb1f23f1a723458b072a7661893e115506a69d7
MD5 4273dcc7f0e2659fff892e73352b2604
BLAKE2b-256 84dd3f7e419c026874592fcda9c46db636f0ae2d33ebef34aad5138a76c6875f

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for mongomock_motor-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 f87ed74a375ce34c3fb5e84d5e3366ce69d4e3ea44735ff642be908e72018c42
MD5 f63ae7299fafe0528c503ab54b9b8ab2
BLAKE2b-256 25960cb11270f77eb561bdc0e5c1756e4a2cec7c4088e828275b91e7cdcc2161

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