feat: Update test configurations and add smoke tests for named view routes

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
Ross
2026-04-30 22:35:11 +01:00
co-authored by Copilot
parent d12933e62a
commit 26a73d1d3b
5 changed files with 179 additions and 5 deletions
+26
View File
@@ -0,0 +1,26 @@
import os
from .settings import *
# Test environment should be deterministic and isolated from remote services.
DEBUG = False
# Local Postgres defaults align with docker-compose.test.yml.
DATABASES["default"] = {
"ENGINE": "django.db.backends.postgresql",
"NAME": os.environ.get("TEST_DB_NAME", os.environ.get("POSTGRES_DB", "rad")),
"USER": os.environ.get("TEST_DB_USER", os.environ.get("POSTGRES_USER", "django")),
"PASSWORD": os.environ.get("TEST_DB_PASSWORD", os.environ.get("POSTGRES_PASSWORD", "postgres")),
"HOST": os.environ.get("TEST_DB_HOST", "127.0.0.1"),
"PORT": os.environ.get("TEST_DB_PORT", "5432"),
"TEST": {
"NAME": os.environ.get("TEST_DB_TEST_NAME", "test_rad"),
},
}
# Keep tests fast and avoid external side effects.
EMAIL_BACKEND = "django.core.mail.backends.locmem.EmailBackend"
CACHES["default"] = {
"BACKEND": "django.core.cache.backends.locmem.LocMemCache",
}