No project description provided
Project description
pytest-django-docker-pg
Starts a dockerized postgresql instance in pytest hook allowing pytest_django
tests, for example, to be run against it.
How to use
[tool.pytest.ini_options]
addopts = "-p pytest_django_docker_pg --django-docker-pg-image=postgres:16-alpine "
# settings.py
import os
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql",
"NAME": os.getenv("DB_NAME", "postgres"),
"USER": os.getenv("DB_USER", "postgres"),
"PASSWORD": os.getenv("DB_PASSWORD", "secret"),
"HOST": os.getenv("DB_HOST", "localhost"),
"PORT": os.getenv("DB_PORT", "5432"),
}
}
Project details
Release history Release notifications | RSS feed
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
Close
Hashes for pytest_django_docker_pg-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 131899015ccd3e882124c54fe0159ce9ec53d205ff9c36a1fc1b3e3d59094a57 |
|
MD5 | 7da162d72836fed7728753a1c468466c |
|
BLAKE2b-256 | 0227c632e7597f2c243b26d0e63c34b2eee376b18cc2f6780d630799042b0282 |
Close
Hashes for pytest_django_docker_pg-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae6e74d15909b05418312f2652daa547982063e8f2de302e2da4d11ef0e49d32 |
|
MD5 | 35e34c6730042c0e99e22b97ce01ae79 |
|
BLAKE2b-256 | ef8f3952cbd2388391fb63d1ef16fee7363f12a30616939ef441765f494182d0 |