Show source location (city/state/zip) in list_sources output
CI / test (push) Successful in 17s
CI / build-push (push) Successful in 5s

/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:
2026-05-30 11:07:34 -04:00
parent a3b77414d8
commit ffc705f485
2 changed files with 13 additions and 3 deletions
+2
View File
@@ -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():