test: migrate backend suites to pytest with module coverage gate
Split backend tests into unit and integration suites, add isolated fixtures and coverage enforcement, and update CI and test documentation. Cover current authentication, content, notification, payment, media, and admin flows; fix behaviors revealed by the new tests. Validate both suites and the per-module gate against local PostgreSQL.
This commit is contained in:
13
pytest.ini
Normal file
13
pytest.ini
Normal file
@@ -0,0 +1,13 @@
|
||||
[pytest]
|
||||
DJANGO_SETTINGS_MODULE = config.settings.test
|
||||
python_files = test_*.py
|
||||
testpaths = apps core config
|
||||
markers =
|
||||
unit: Isolated tests without database or HTTP requests.
|
||||
integration: Database, HTTP, or management command tests.
|
||||
addopts = --strict-markers --import-mode=importlib
|
||||
filterwarnings =
|
||||
# Django Ninja 1.4.3 still defines internal schemas with Pydantic class Config.
|
||||
ignore:Support for class-based `config` is deprecated: pydantic.warnings.PydanticDeprecatedSince20
|
||||
# Django 5.2 warns while Ninja builds schemas from model URLFields.
|
||||
ignore:The default scheme will be changed from 'http' to 'https' in Django 6.0:django.utils.deprecation.RemovedInDjango60Warning
|
||||
Reference in New Issue
Block a user