fix(test-settings): honor DATABASE_URL in test configuration
Some checks failed
CI / lint (push) Successful in 6s
CI / test (push) Failing after 9s
CI / build-container (push) Has been skipped

This commit is contained in:
Paperclip CTO
2026-05-18 14:56:37 +02:00
parent 8b2ac6b52b
commit 348aecbead

View File

@@ -1,19 +1,16 @@
from .base import * # noqa: F401, F403
from .base import env
DEBUG = False
ALLOWED_HOSTS = ["testserver", "localhost"]
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql",
"NAME": "training_test",
"USER": "training",
"PASSWORD": "training",
"HOST": "localhost",
"PORT": "5432",
"TEST": {"NAME": "training_test"},
}
"default": env.db(
"DATABASE_URL",
default="postgres://training:training@localhost:5432/training_test",
)
}
DATABASES["default"].setdefault("TEST", {"NAME": "training_test"})
CACHES = {
"default": {