mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-08-03 01:38:06 +00:00
Merge branch 'claude/sports-unification-safety-net' into claude/sports-unification-phase1
This commit is contained in:
@@ -434,6 +434,17 @@ def build_manager(monkeypatch, tmp_path):
|
||||
"src.base_classes.sports.core.get_background_service",
|
||||
lambda *args, **kwargs: MagicMock())
|
||||
|
||||
# Rig requests.Session BEFORE any manager is built. Construction creates
|
||||
# both SportsCore.session and the ESPNDataSource.session; replacing only
|
||||
# manager.session after the fact (below) leaves data_source.session real,
|
||||
# so an accidental fetch during or right after construction could reach
|
||||
# the network. Patching the class makes every session created here raise.
|
||||
def _offline_get(*args, **kwargs):
|
||||
raise requests.exceptions.ConnectionError(
|
||||
"characterization tests are offline")
|
||||
|
||||
monkeypatch.setattr(requests.Session, "get", _offline_get)
|
||||
|
||||
def build(cls, schedule, **mode_cfg):
|
||||
config = {
|
||||
"timezone": "UTC",
|
||||
|
||||
Reference in New Issue
Block a user