diff --git a/tools/test_vehicle_ingest_live_verify.py b/tools/test_vehicle_ingest_live_verify.py index d2f300e3..7b9b5593 100644 --- a/tools/test_vehicle_ingest_live_verify.py +++ b/tools/test_vehicle_ingest_live_verify.py @@ -125,7 +125,7 @@ class VehicleIngestLiveVerifyTest(unittest.TestCase): "rawUri": "archive://frame.bin", }]) - def test_jt808_location_sql_uses_dedicated_location_stable_without_protocol_filter(self): + def test_jt808_location_sql_uses_current_vehicle_locations_stable_with_protocol_filter(self): sql = live_verify.jt808_location_count_sql( date_from="2026-06-29 00:00:00", date_to="2026-06-29 23:59:59", @@ -133,8 +133,8 @@ class VehicleIngestLiveVerifyTest(unittest.TestCase): self.assertEqual( sql, - "SELECT COUNT(*) FROM jt808_locations WHERE " - "ts >= '2026-06-29 00:00:00' AND ts <= '2026-06-29 23:59:59'", + "SELECT COUNT(*) FROM vehicle_locations WHERE protocol = 'JT808' " + "AND ts >= '2026-06-29 00:00:00' AND ts <= '2026-06-29 23:59:59'", ) diff --git a/tools/vehicle_ingest_live_verify.py b/tools/vehicle_ingest_live_verify.py index 531701fb..dae81b33 100755 --- a/tools/vehicle_ingest_live_verify.py +++ b/tools/vehicle_ingest_live_verify.py @@ -53,7 +53,7 @@ def jt808_raw_count_sql(date_from: str, date_to: str, peer_like: str = "") -> st def jt808_location_count_sql(date_from: str, date_to: str) -> str: - return count_sql("jt808_locations", [], date_from, date_to) + return count_sql("vehicle_locations", ["protocol = 'JT808'"], date_from, date_to) def gb32960_platform_login_count_sql(date_from: str, date_to: str, peer_like: str = "") -> str: