feat: Update test configurations and add smoke tests for named view routes
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -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",
|
||||
}
|
||||
Reference in New Issue
Block a user