A tiny plugin for pytest which runs MongoDB in Docker
Project description
Data directory is mounted to a tmpfs for speed.
How to use?
import pymongo
def test_pymongo(mongo):
client = pymongo.MongoClient(host=mongo.host, port=mongo.port)
db = client["test_db"]
collection = db["test_collection"]
collection.insert_one({"key": "value"})
doc = collection.find_one({"key": "value"})
assert doc["key"] == "value"
client.close()
v0.0.1 (2026-02-11)
- A first version
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytest_mongo_docker-0.0.1.tar.gz.
File metadata
- Download URL: pytest_mongo_docker-0.0.1.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
994d805ed75550e334d42c0a14ef974496baf76a5737b6a40b25303fe4d44413
|
|
| MD5 |
d65693a20df3ce28c7f180c4df9e407c
|
|
| BLAKE2b-256 |
464be9693566eb52238f5818b3bc75018f6e54d1aa9e12f4b629b73303597feb
|
File details
Details for the file pytest_mongo_docker-0.0.1-py3-none-any.whl.
File metadata
- Download URL: pytest_mongo_docker-0.0.1-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88a07ee66e839053dd1efae8958e1f4bee5f72ddd6e58615e96528bb4cf499cd
|
|
| MD5 |
6a38f1a6440b91b453bb789e61fb2b04
|
|
| BLAKE2b-256 |
e9d3c9eb762054148d4f5df3a4f01e3040ab141165afb7ad731629a97f333818
|