Files
miem_workers/tests/test_config.py
admin baad49b976
All checks were successful
CI / test (pull_request) Successful in 9m19s
CI / deploy (pull_request) Has been skipped
docs: record dismissal config fix
2026-09-14 12:53:01 +03:00

23 lines
653 B
Python

from app.config import Settings
def test_empty_crawl_limit_is_treated_as_none():
settings = Settings(crawl_limit="")
assert settings.crawl_limit is None
def test_numeric_crawl_limit_is_parsed():
settings = Settings(crawl_limit="25")
assert settings.crawl_limit == 25
def test_dismissal_safety_settings_have_conservative_defaults(monkeypatch):
monkeypatch.delenv("DISMISSAL_CONFIRMATION_RUNS", raising=False)
monkeypatch.delenv("MAX_AUTO_DISMISSALS_PER_RUN", raising=False)
settings = Settings(_env_file=None)
assert settings.dismissal_confirmation_runs == 3
assert settings.max_auto_dismissals_per_run == 25