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:
@@ -55,9 +55,9 @@ class AppNetworkTest(unittest.TestCase):
|
||||
@patch("modules.app_network._phone_ssid", return_value="")
|
||||
@patch(
|
||||
"modules.app_network._nmcli",
|
||||
return_value="Hotspot\n100 (connected)\n2 (portal)\n10.42.0.1/24",
|
||||
return_value="home-wifi\n100 (connected)\n2 (portal)\n192.168.50.220/24",
|
||||
)
|
||||
def test_local_hotspot_does_not_claim_internet_or_large_uploads(
|
||||
def test_no_internet_blocks_large_uploads(
|
||||
self,
|
||||
_nmcli,
|
||||
_ssid,
|
||||
@@ -65,7 +65,7 @@ class AppNetworkTest(unittest.TestCase):
|
||||
with patch("builtins.open", side_effect=FileNotFoundError):
|
||||
status = app_network.get_status()
|
||||
|
||||
self.assertEqual(status["mode"], "local_hotspot")
|
||||
self.assertEqual(status["mode"], "wifi")
|
||||
self.assertFalse(status["internet_reachable"])
|
||||
self.assertFalse(status["large_upload_allowed"])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user