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

Uploaded Source

Built Distributions

mongomock_motor-0.0.5-py3.8.egg (12.5 kB view details)

Uploaded Source

mongomock_motor-0.0.5-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mongomock_motor-0.0.5.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.12

File hashes

Hashes for mongomock_motor-0.0.5.tar.gz
Algorithm Hash digest
SHA256 7425a9e54f438f0396c1724069991901febea6434733204c0da23e23540d44ee
MD5 a75bad6120e7074a38cff3dc2c7a806b
BLAKE2b-256 805a464fe16ea4c227c3f03437531c640bd97e50b5b8f485d35f998cfaa4cce9

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: mongomock_motor-0.0.5-py3.8.egg
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.12

File hashes

Hashes for mongomock_motor-0.0.5-py3.8.egg
Algorithm Hash digest
SHA256 96e09793ee4ed82685b7bdf6d68db0041278b6de4adfc0780e9076f7c11edffb
MD5 dfad77565ed375dc42d5dcc989fe9322
BLAKE2b-256 7a40eb84eb1cbd7c3794fd31c067ce17f612e4f66deef1d0290b3776d36b92f3

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: mongomock_motor-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.12

File hashes

Hashes for mongomock_motor-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 24c8eb16372eec676b906e31b69841066a5058bdfaf563d62051df964227ab99
MD5 aaa0684abd8151c73d017f25749a9e79
BLAKE2b-256 8765d1e5e9cd8d6f77d66c68e8a2fa50a54de41f309be25ac86de38a85605bc0

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