diff --git a/.gitignore b/.gitignore index 035b3e4b..c6fcea70 100644 --- a/.gitignore +++ b/.gitignore @@ -109,6 +109,7 @@ celerybeat.pid # Environments .env .venv +.kali env/ venv/ ENV/ @@ -180,3 +181,4 @@ ooo.html # Test reports newman-report*.json *-report.json +dump.rdb diff --git a/backend/eusrr_backend/settings_test.py b/backend/eusrr_backend/settings_test.py index 5923d20d..5e085eb8 100644 --- a/backend/eusrr_backend/settings_test.py +++ b/backend/eusrr_backend/settings_test.py @@ -10,3 +10,9 @@ CHANNEL_LAYERS = { "BACKEND": "channels.layers.InMemoryChannelLayer" } } + +# Celery - синхронное выполнение в тестах (без отдельного worker) +CELERY_TASK_ALWAYS_EAGER = True +CELERY_TASK_EAGER_PROPAGATES = True +CELERY_BROKER_URL = 'memory://' +CELERY_RESULT_BACKEND = 'cache+memory://' diff --git a/backend/pytest.ini b/backend/pytest.ini index bb9d17d8..baa2e118 100644 --- a/backend/pytest.ini +++ b/backend/pytest.ini @@ -12,6 +12,7 @@ markers = integration: marks tests as integration tests slow: marks tests as slow running asyncio: marks tests as asynchronous tests + performance: marks tests as performance tests # Исключить manual tests по умолчанию addopts = -m "not manual" --strict-markers