feat: added tests
CI / test (push) Failing after 20s
CI / build (push) Has been skipped

This commit is contained in:
2026-07-16 15:08:04 +02:00
parent 46816c7820
commit b28293d5b2
142 changed files with 627 additions and 32118 deletions
+20
View File
@@ -0,0 +1,20 @@
import tempfile
import pytest
from django.core.management import call_command
from django.test import override_settings
@pytest.fixture(scope='session', autouse=True)
def collected_static_files():
"""{% static %} (usado en pattern.html/pattern_detail.html) necesita el
manifest que genera collectstatic cuando STORAGES['staticfiles'] es
CompressedManifestStaticFilesStorage (ver settings.py); sin esto,
cualquier test que renderice una de esas plantillas falla con
"Missing staticfiles manifest entry". Se recopila a un directorio
temporal (no al STATIC_ROOT real del proyecto) para no depender de ―ni
tocar― lo que ya haya en config/static/."""
with tempfile.TemporaryDirectory() as static_root:
with override_settings(STATIC_ROOT=static_root):
call_command('collectstatic', interactive=False, verbosity=0)
yield