feat(tradein/avito): ротация exit-IP по счётчику попыток в доборе карточек #3302
1 changed files with 6 additions and 0 deletions
|
|
@ -67,6 +67,12 @@ def _fake_settings(**overrides: object) -> MagicMock:
|
||||||
"detail_backfill_block_ratio_window": 20,
|
"detail_backfill_block_ratio_window": 20,
|
||||||
"detail_backfill_block_ratio_threshold": 0.7,
|
"detail_backfill_block_ratio_threshold": 0.7,
|
||||||
"browser_http_endpoint": "http://browser:9000",
|
"browser_http_endpoint": "http://browser:9000",
|
||||||
|
# Реальный дефолт (config.py). Без него bare MagicMock отдаёт
|
||||||
|
# child-MagicMock на сравнение `attempts_since_rotation >= settings.avito_
|
||||||
|
# detail_backfill_rotate_after_attempts` в browser-режиме, и тест падает
|
||||||
|
# TypeError: '>=' not supported between 'int' and 'MagicMock'. Та же
|
||||||
|
# ловушка, что уже описана здесь для detail_backfill_block_ratio_window.
|
||||||
|
"avito_detail_backfill_rotate_after_attempts": 15,
|
||||||
}
|
}
|
||||||
defaults.update(overrides)
|
defaults.update(overrides)
|
||||||
return MagicMock(**defaults)
|
return MagicMock(**defaults)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue