fix pre-commit
Some checks failed
CI/CD Pipeline / Telegram Notify Success (push) Has been cancelled
CI/CD Pipeline / Code Quality Checks (push) Has been cancelled
CI/CD Pipeline / Run Tests (push) Has been cancelled
CI/CD Pipeline / Code Quality Checks (pull_request) Successful in 17m25s
CI/CD Pipeline / Run Tests (pull_request) Successful in 20m1s
CI/CD Pipeline / Telegram Notify Success (pull_request) Has been cancelled

This commit is contained in:
2026-03-20 10:56:33 +01:00
parent 0824733d1a
commit 46e6e24934
2 changed files with 10 additions and 9 deletions

View File

@@ -18,9 +18,7 @@ from django.db.models import Max
class Command(BaseAppCommand): class Command(BaseAppCommand):
"""Генерирует тестовые данные для всех реестров на основе фабрик тестов.""" """Генерирует тестовые данные для всех реестров на основе фабрик тестов."""
help = ( help = "Генерация тестовых данных для registers/parsers на основе фабрик из tests"
"Генерация тестовых данных для registers/parsers на основе фабрик из tests"
)
use_transaction = True use_transaction = True
def add_arguments(self, parser) -> None: def add_arguments(self, parser) -> None:
@@ -111,9 +109,7 @@ class Command(BaseAppCommand):
) )
for index in range(1, count + 1): for index in range(1, count + 1):
procurement_factory.create( procurement_factory.create(purchase_number=f"{run_seed:06d}{index:013d}")
purchase_number=f"{run_seed:06d}{index:013d}"
)
created_by_registry = { created_by_registry = {
"industrial_certificates": count, "industrial_certificates": count,
@@ -125,9 +121,7 @@ class Command(BaseAppCommand):
self.log_info("Создание прокси и логов загрузок...") self.log_info("Создание прокси и логов загрузок...")
for index in range(1, count + 1): for index in range(1, count + 1):
proxy_factory.create( proxy_factory.create(address=f"http://proxy-{run_token}-{index}.local:8080")
address=f"http://proxy-{run_token}-{index}.local:8080"
)
load_log_sources = [source for source, _ in ParserLoadLog.Source.choices] load_log_sources = [source for source, _ in ParserLoadLog.Source.choices]
for source in load_log_sources: for source in load_log_sources:

View File

@@ -69,3 +69,10 @@ CACHES = {
# Email # Email
EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend" EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
# DRF: отключаем throttling в dev, чтобы не мешать фронту тестировать API.
REST_FRAMEWORK = {
**globals().get("REST_FRAMEWORK", {}),
"DEFAULT_THROTTLE_CLASSES": [],
"DEFAULT_THROTTLE_RATES": {},
}