{"library":"pytest-mongo","title":"pytest-mongo","description":"MongoDB process and client fixtures plugin for Pytest. Provides fixtures to start a MongoDB process and provide a pymongo client. Version 4.0.0 requires Python >=3.10 and uses the pytest-dbfixtures framework for managing MongoDB processes.","language":"python","status":"active","last_verified":"Mon Apr 27","install":{"commands":["pip install pytest-mongo"],"cli":null},"imports":["from pytest_mongo import mongo_proc","from pytest_mongo import mongo_client"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import pytest\n\npytest_plugins = [\"pytest_mongo\"]\n\ndef test_mongo(mongo_client):\n    db = mongo_client.test_database\n    collection = db.test_collection\n    collection.insert_one({\"name\": \"test\"})\n    assert collection.find_one({\"name\": \"test\"}) is not None\n","lang":"python","description":"Add pytest_plugins to conftest or test file, then use mongo_client fixture directly.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}