"""
Test settings – overrides the default (PostgreSQL) database with SQLite in-memory
so that tests can run without a database server.
"""

from config.settings import *  # noqa: F401, F403

# Register test-only app that provides a dual-inheritance model
# (RestrictedObject + UserGroupSubject) for core library tests.
INSTALLED_APPS = [*INSTALLED_APPS, "topdownrbac.tests.testapp"]  # noqa: F405

DATABASES = {
    "default": {
        "ENGINE": "django.db.backends.sqlite3",
        "NAME": ":memory:",
    }
}

# Use fast MD5 hashing instead of PBKDF2 to speed up tests
PASSWORD_HASHERS = [
    "django.contrib.auth.hashers.MD5PasswordHasher",
]
