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
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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe65f54a8e58c3930f16a62076314787c5538020ea8dbbbccb1fec8cb5cca40a |
|
MD5 | 1e9088c97f137c6b0e054164daf26191 |
|
BLAKE2b-256 | a309671541de8295aefca0c1dd58b49925839046ff76bc460359554e15938636 |
Close
Hashes for pytest_django_docker_pg-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a65c6cab40bec848acae591d7472a41c432ab94a90d1c6dbeaa97722ad5e39da |
|
MD5 | ce369e0eb9530fa7be3d2e54b22ea687 |
|
BLAKE2b-256 | e1de9e721e10c9b9d280595296053241b80f37a0fd9e826c0884a83d7b4a4d9a |