mirror of
https://github.com/BigBodyCobain/Shadowbroker.git
synced 2026-06-07 23:03:54 +02:00
80a01275ff
Operators enable Polymarket/Kalshi correlation from Global Threat Intercept with a consent dialog; polls use a jittered schedule separate from the slow tier. Right-click Sentinel imagery returns up to three signed scenes again. Co-authored-by: Cursor <cursoragent@cursor.com>
25 lines
1006 B
Python
25 lines
1006 B
Python
"""UI opt-in for prediction markets (Global Threat Intercept)."""
|
|
|
|
from services import prediction_markets_settings as pm_settings
|
|
from services.fetchers import prediction_markets
|
|
|
|
|
|
def test_ui_opt_in_enables_fetch(monkeypatch, tmp_path):
|
|
opt_file = tmp_path / "prediction_markets_opt_in.json"
|
|
monkeypatch.setattr(pm_settings, "_OPT_IN_FILE", opt_file)
|
|
monkeypatch.delenv("PREDICTION_MARKETS_ENABLED", raising=False)
|
|
|
|
assert pm_settings.prediction_markets_fetch_enabled() is False
|
|
|
|
pm_settings.set_prediction_markets_ui_opt_in(True)
|
|
assert pm_settings.prediction_markets_fetch_enabled() is True
|
|
assert prediction_markets.prediction_markets_fetch_enabled() is True
|
|
|
|
|
|
def test_env_force_on_without_ui_file(monkeypatch, tmp_path):
|
|
opt_file = tmp_path / "prediction_markets_opt_in.json"
|
|
monkeypatch.setattr(pm_settings, "_OPT_IN_FILE", opt_file)
|
|
monkeypatch.setenv("PREDICTION_MARKETS_ENABLED", "true")
|
|
|
|
assert pm_settings.prediction_markets_fetch_enabled() is True
|