Show source location (city/state/zip) in list_sources output
/api/data/sources now returns per-source geo; surface it as a Location column in the sources table. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -200,12 +200,14 @@ def test_fmt_basis_detail_per_series():
|
||||
def test_fmt_sources_table():
|
||||
payload = {"sources": [
|
||||
{"id": 1, "name": "Test Elev", "kind": "elevator",
|
||||
"city": "Ada", "state": "OH", "zip": "45810",
|
||||
"last_success_at": "2026-05-20T14:55:00+00:00",
|
||||
"consecutive_failures": 0, "last_error": None},
|
||||
]}
|
||||
out = fmt.fmt_sources(payload)
|
||||
assert "Test Elev" in out
|
||||
assert "elevator" in out
|
||||
assert "Ada, OH 45810" in out # location column
|
||||
|
||||
|
||||
def test_fmt_health_buckets():
|
||||
|
||||
Reference in New Issue
Block a user