gendesign/tradein-mvp/backend/tests/test_config_avito_rotations.py
bot-backend 687c9e5e9d
All checks were successful
CI / changes (pull_request) Successful in 6s
CI / backend-tests (pull_request) Has been skipped
CI / frontend-tests (pull_request) Has been skipped
CI / openapi-codegen-check (pull_request) Has been skipped
fix(avito): proactive IP rotate at sweep start + raise max_rotations 2->4 (Datadome ban recovery)
2026-06-17 23:35:24 +03:00

17 lines
557 B
Python

"""#1731 — default avito_proxy_max_rotations bumped 2→4 (Datadome ban recovery).
Reactive rotation budget per page is raised so a sweep has more chances to recover
mid-run after the proactive rotate-at-start. No network, no DB.
"""
import os
os.environ.setdefault("DATABASE_URL", "postgresql+psycopg://test:test@localhost/test_db")
from app.core.config import Settings
def test_avito_proxy_max_rotations_default_is_4() -> None:
"""Field default must be 4 (was 2 before #1731)."""
s = Settings()
assert s.avito_proxy_max_rotations == 4