test: align suite with shipped behavior (WiFi swap, BUG-10 guard, odometer_baseline)

- test_app_trip + test_trip_sql: mock was_car_ever_connected() so trip
  building runs (BUG-10 guard suppresses trips until car ECU reached)
- test_app_settings: include odometer_baseline in valid payload + assert save
- test_yaris_uplink: Hotspot -> Hotspot-local; restore_fallback no longer
  activates AP (reports no_connection); wait timeout writes fallback_restored
- test_app_network: local_hotspot mode removed by WiFi swap -> wifi/no-internet
This commit is contained in:
Mathieu Moran
2026-08-12 19:14:07 -04:00
parent 2e8e42a165
commit 81c7ee25fd
5 changed files with 36 additions and 19 deletions
+2
View File
@@ -18,6 +18,7 @@ def valid_payload():
"ntfy_token": "secret-token",
"clear_ntfy_url": False,
"clear_ntfy_token": False,
"odometer_baseline": 0,
"alert_thresholds": {
"temperature_c": 75.5,
"disk_percent": 88,
@@ -66,6 +67,7 @@ class SettingsUpdateTest(unittest.TestCase):
)
self.assertEqual(self.settings["alert_ntfy_token"], "secret-token")
self.assertEqual(self.settings["alert_temperature_c"], "75.5")
self.assertEqual(self.settings["odometer_baseline"], "0.0")
def test_invalid_payload_does_not_save_any_settings(self):
payload = valid_payload()