Skip to main content

Library for mocking AsyncIOMotorClient built on top of mongomock.

Project description

mongomock-motor

PyPI version FOSSA Status

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

License

FOSSA Status

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

Uploaded Source

Built Distribution

mongomock_motor-0.0.33-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mongomock_motor-0.0.33.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.9 Linux/6.5.0-1025-azure

File hashes

Hashes for mongomock_motor-0.0.33.tar.gz
Algorithm Hash digest
SHA256 95efde2f27d7b786467bc5c65e722ba2b8a6a2d29722eaef06154fa1748c7fab
MD5 539b39d8a0dfafae6af8801b2a05caa9
BLAKE2b-256 be6faa6262b6b6d49e8833e47cbb5ceac15694387f9200061fc9188e79a2b158

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: mongomock_motor-0.0.33-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.9 Linux/6.5.0-1025-azure

File hashes

Hashes for mongomock_motor-0.0.33-py3-none-any.whl
Algorithm Hash digest
SHA256 4a8cec596aeb8cec2c7d6d4862a72594068da2f1cc06854a878f43baedca4935
MD5 63641bd2559fbcb4d069282d01fa5527
BLAKE2b-256 7d33e65059caa150baf7a4bbe70b7ac52b96d99cb530a91f0fe064666548b047

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