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

Uploaded Source

Built Distributions

mongomock_motor-0.0.11-py3.8.egg (22.3 kB view details)

Uploaded Source

mongomock_motor-0.0.11-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mongomock_motor-0.0.11.tar.gz
Algorithm Hash digest
SHA256 d6793ded636091561718fad3ff4f715d78daf6f093dc8d2ad994ac74055c807d
MD5 fc60bfdf54d352001ad03e8367374197
BLAKE2b-256 19ec20152207f8c704752baaaa59feb2e2d5fb9207dcecae8b3b406649dfe7ed

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for mongomock_motor-0.0.11-py3.8.egg
Algorithm Hash digest
SHA256 0b80d20319497d8989ea126d3c9810e712f54c5a36c445c2186108f4d8559348
MD5 e92541fcfb6469929a360733e91f9de0
BLAKE2b-256 8a0e9fe8c6b2a6ce57155f49f14e6f17258054d8dd3b4fd102051efbf481ee99

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for mongomock_motor-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 4db0250aa7c3f63d4cce252ee81d014c1ba3ddc727dd5941bb6085b3a21504fe
MD5 4bea50903303c6a30ebfadd22f481fd1
BLAKE2b-256 bbd98b512de7037b44f407304511b09c7504a3a4f61c9228fae4618cf6de3d12

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