mirror of
https://github.com/BigBodyCobain/Shadowbroker.git
synced 2026-09-23 09:20:51 +02:00
Harden production checklist: dedupe live-data routes and align serializers.
Pin Mathieu's data-path checklist in docs and PR template, remove dead main.py fast/slow handlers, unify orjson via _live_data_json_bytes, and bound LiveUAMap Playwright defaults. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -38,14 +38,6 @@
|
||||
"main",
|
||||
"routers.health"
|
||||
],
|
||||
"GET /api/live-data/fast": [
|
||||
"main",
|
||||
"routers.data"
|
||||
],
|
||||
"GET /api/live-data/slow": [
|
||||
"main",
|
||||
"routers.data"
|
||||
],
|
||||
"GET /api/mesh/channels": [
|
||||
"main",
|
||||
"routers.mesh_public"
|
||||
|
||||
@@ -66,6 +66,24 @@ class TestLiveDataFullEndpoint:
|
||||
assert r2.status_code == 304
|
||||
assert r2.headers.get("etag") == etag
|
||||
|
||||
def test_live_data_fast_serializes_non_json_native_values(self, client):
|
||||
from datetime import datetime, timezone
|
||||
|
||||
from services.fetchers import _store
|
||||
|
||||
with _store._data_lock:
|
||||
prior = _store.latest_data.get("sigint")
|
||||
_store.latest_data["sigint"] = [
|
||||
{"source": "aprs", "observed": datetime(2026, 1, 1, tzinfo=timezone.utc)},
|
||||
]
|
||||
try:
|
||||
r = client.get("/api/live-data/fast")
|
||||
assert r.status_code == 200
|
||||
assert "2026-01-01" in r.text
|
||||
finally:
|
||||
with _store._data_lock:
|
||||
_store.latest_data["sigint"] = prior
|
||||
|
||||
def test_live_data_serializes_non_json_native_values(self, client):
|
||||
from datetime import datetime, timezone
|
||||
|
||||
|
||||
Reference in New Issue
Block a user