"""
Django test settings that extend the main settings.

This file imports all settings from the main settings module and
overrides/adds settings specific to testing.
"""

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

SECRET_KEY = "test-secret-key-for-testing-only-do-not-use-in-production"
SALT_KEY = SECRET_KEY
PASSWORD_HASHERS = [
    "django.contrib.auth.hashers.MD5PasswordHasher",
]


class DisableMigrations:
    def __contains__(self, item):
        return True

    def __getitem__(self, item):
        return None


MIGRATION_MODULES = DisableMigrations()

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

OSB_USERNAME = "testuser"
OSB_PASSWORD = "testpass"

EMAIL_BACKEND = "django.core.mail.backends.locmem.EmailBackend"
