fix: gate setups on SEC filing completeness

This commit is contained in:
2026-08-03 23:47:07 +02:00
parent 7d703ea524
commit 3a6900d45a
11 changed files with 723 additions and 56 deletions
+23
View File
@@ -108,3 +108,26 @@ async def test_scan_error_does_not_stop_later_tickers(session, monkeypatch):
await rr_scanner_service.scan_all_tickers(session)
assert scanned == ["AAA", "BBB"]
async def test_scan_skips_ticker_with_incomplete_sec_fundamentals(
session, monkeypatch
):
ticker = Ticker(symbol="BLOCKED", cik="0000000001")
session.add(ticker)
await session.commit()
async def _blocked(db):
return {ticker.id}
async def _unexpected_scan(*args, **kwargs):
raise AssertionError("fundamentals-incomplete ticker was scanned")
monkeypatch.setattr(
rr_scanner_service.fundamentals_quality_service,
"blocked_ticker_ids",
_blocked,
)
monkeypatch.setattr(rr_scanner_service, "scan_ticker", _unexpected_scan)
assert await rr_scanner_service.scan_all_tickers(session) == []