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

Uploaded Source

Built Distributions

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

Uploaded Source

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mongomock_motor-0.0.19.tar.gz
Algorithm Hash digest
SHA256 1d716c20b982c11fad2569d0d220c570fdaf63a90a719a00bb83622fefcd6646
MD5 4e3a88dd14bc0927b7eccee6c7169829
BLAKE2b-256 18b2b51cc5e3420d412321512d320ad069afb34e7126afb3fd24a8ab6b453614

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: mongomock_motor-0.0.19-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.11

File hashes

Hashes for mongomock_motor-0.0.19-py3.10.egg
Algorithm Hash digest
SHA256 bd1adb6d137d31337bb108097807687c2a09ce5dcaa497cedc4876a1f32fffd3
MD5 3c7c412709ec7872e2b39c10a0e751db
BLAKE2b-256 2b8858c513b75da611e3a53457b7d29ea337401789a9b4fee1412716b951635c

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for mongomock_motor-0.0.19-py3-none-any.whl
Algorithm Hash digest
SHA256 954444de0a6371acbd45b0ecad6a9daab99e0e652c863d15a65189a196201cc5
MD5 18d847bff747b484e52e997cad612bb6
BLAKE2b-256 c1723f83d7a581b625f488aa1356aca1c9355734a199c3542af149d04158f4a2

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