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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88c79d8a39d4e62c5d0e8331e09e87d7a6b843dc3c258874e6ad2ac04b3427a7 |
|
MD5 | abff2e44140520cd21dfda6039f5b156 |
|
BLAKE2b-256 | f38bc5cc542a70ca495f446d8b0525cb0543367ea54da65945cc6e4857d862bf |
Close
Hashes for pytest_django_docker_pg-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fbced804addab0dea09b73a3f2835a50fbca8decb2e6725e1ad403f9eef30c99 |
|
MD5 | a201ff0e8ae35f140c3403ae05d04912 |
|
BLAKE2b-256 | bdb192e55f04e02afd5d76a1965549f798b9add4a6d2d9475925d954fe64d0ca |