fix: isolate auxiliary price source failures
This commit is contained in:
@@ -89,8 +89,8 @@ def test_partial_fast_scrape_preserves_last_known_good_metric(server, monkeypatc
|
||||
monkeypatch.setattr(server, "HISTORY_PATH", str(history_path))
|
||||
monkeypatch.setattr(server.fear_greed, "fetch", lambda: {"value": 25})
|
||||
monkeypatch.setattr(server.price, "fetch_current", lambda: (_ for _ in ()).throw(RuntimeError("price timeout")))
|
||||
monkeypatch.setattr(server.price, "fetch_ath", lambda: {"ath": 70000})
|
||||
monkeypatch.setattr(server.price, "fetch_historical", lambda: [])
|
||||
monkeypatch.setattr(server.price, "fetch_ath", lambda: (_ for _ in ()).throw(RuntimeError("ATH timeout")))
|
||||
monkeypatch.setattr(server.price, "fetch_historical", lambda: (_ for _ in ()).throw(RuntimeError("history timeout")))
|
||||
monkeypatch.setattr(server.engine, "score_all", lambda metrics: {"composite_score": 50, "scored_count": 1, "metrics": []})
|
||||
monkeypatch.setattr(server.engine, "score_all_ml", lambda metrics: {"composite_score": 50, "scored_count": 1, "metrics": []})
|
||||
fake_updater = types.ModuleType("scrapers.history_updater")
|
||||
|
||||
Reference in New Issue
Block a user