feat: included 2FA and lots of feature from django-htmx-template
CI / test (push) Successful in 2m13s
CI / build (push) Successful in 55s

This commit is contained in:
2026-09-16 13:20:44 +02:00
parent db21129960
commit 4b0d404116
52 changed files with 3135 additions and 311 deletions
+14
View File
@@ -1,10 +1,24 @@
import tempfile
import pytest
from django.core.cache import cache
from django.core.management import call_command
from django.test import override_settings
@pytest.fixture(autouse=True)
def clear_ratelimit_cache():
"""django-ratelimit (ver LOGIN_RATE/REGISTER_RATE/PASSWORD_RESET_RATE en
crochet/views.py) cuenta peticiones en el cache framework de Django, que
-a diferencia de la base de datos- no se resetea solo entre tests; sin
esto, tests de distintos módulos que llaman a la misma vista (login,
registro...) irían sumando al mismo contador y algún test acabaría
recibiendo un 403 por límite alcanzado en vez del resultado que espera,
según en qué orden se ejecuten."""
cache.clear()
yield
@pytest.fixture(scope='session', autouse=True)
def collected_static_files():
"""{% static %} (usado en pattern.html/pattern_detail.html) necesita el