fix: stabilize test suite and repair frontend/backend wiring

- meshcore pin >=2.3.0 (EventType.STATS_CORE floor); setup.sh derives
  optional packages from requirements.txt; Python 3.10 warning
- agent-mode wifi clients proxy route + bare-array response handling
- remove dead AIS/ACARS/VDL2 SPA wiring and orphaned partials/CSS
- agent TLE download to data/tle/ (was littering repo root as gp.php)
- gate deferred background init off under pytest (mock-pollution race)
- complete Popen mocks (context manager protocol, communicate tuples)
- real pipe fds in weather-sat decoder tests (fd 10/11 collision caused
  10s SQLite stalls); satellite tests no longer rewrite data/satellites.py
- register 'live' pytest marker, excluded by default
- update stale test assertions to current APIs

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
James Smith
2026-06-11 16:42:33 +01:00
parent 0a6ad837d8
commit 746d195d76
27 changed files with 3128 additions and 4029 deletions
+17
View File
@@ -8,6 +8,23 @@ from flask import Flask
from routes.satellite import satellite_bp
@pytest.fixture(autouse=True)
def _isolate_tle_state(monkeypatch):
"""Keep TLE updates off the real data/satellites.py and reset the cache.
Without this, the update-tle test rewrites the tracked data file on
every run and leaks 'ISS' into the module-global cache, breaking
later tests that depend on cache contents.
"""
import routes.satellite as sat
monkeypatch.setattr(sat, "_persist_tle_cache", lambda: None)
saved = dict(sat._tle_cache)
yield
sat._tle_cache.clear()
sat._tle_cache.update(saved)
@pytest.fixture
def app():
app = Flask(__name__)