Files
cbwebreader/cbreader/settings/test.py
T
ajurna a7e9bd0743 **Replace Flake8 with Ruff, refactor type hints, and enhance archive processing logic**
- Removed `flake8` and `flake8-annotations` from dependencies, replaced by `ruff` for linting.
- Introduced cleaner type hinting and modern Python annotations (PEP 604 style) across multiple modules.
- Moved archive processing to a dedicated helper (`comic.archives`) for improved maintainability.
- Updated and simplified logic for archive file retrieval, directory cleaning, and user access validation.
- Improved error handling and added support for user classification restrictions in API responses.
2026-10-13 12:07:47 +01:00

25 lines
606 B
Python

"""Settings used by the test suite.
In-memory SQLite so the tests do not need a running Postgres, and a scratch comic
volume that the fixtures fill with generated archives.
"""
import os
from pathlib import Path
from cbreader.settings.base import * # noqa: F403
from cbreader.settings.base import BASE_DIR
SECRET_KEY = 'test-secret-key'
ALLOWED_HOSTS = ['*']
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
COMIC_BOOK_VOLUME = Path(os.environ.get('COMIC_TEST_VOLUME', BASE_DIR / 'test_comics'))
MEDIA_ROOT = BASE_DIR / 'test_media'