diff --git a/frontend/src/components/settings/SettingsFanoutSection.tsx b/frontend/src/components/settings/SettingsFanoutSection.tsx index 60f50db..fd0c17e 100644 --- a/frontend/src/components/settings/SettingsFanoutSection.tsx +++ b/frontend/src/components/settings/SettingsFanoutSection.tsx @@ -24,7 +24,6 @@ const TYPE_LABELS: Record = { map_upload: 'Map Upload', }; - const DEFAULT_COMMUNITY_PACKET_TOPIC_TEMPLATE = 'meshcore/{IATA}/{PUBLIC_KEY}/packets'; const DEFAULT_COMMUNITY_BROKER_HOST = 'mqtt-us-v1.letsmesh.net'; const DEFAULT_COMMUNITY_BROKER_HOST_EU = 'mqtt-eu-v1.letsmesh.net'; @@ -37,7 +36,6 @@ const DEFAULT_MESHRANK_TRANSPORT = 'tcp'; const DEFAULT_MESHRANK_AUTH_MODE = 'none'; const DEFAULT_MESHRANK_IATA = 'XYZ'; - function createCommunityConfigDefaults( overrides: Partial> = {} ): Record { @@ -1176,7 +1174,10 @@ function MapUploadConfigEditor({ placeholder="e.g. 51.5" value={(config.geofence_lat as number | undefined) ?? ''} onChange={(e) => - onChange({ ...config, geofence_lat: e.target.value === '' ? 0 : parseFloat(e.target.value) }) + onChange({ + ...config, + geofence_lat: e.target.value === '' ? 0 : parseFloat(e.target.value), + }) } /> @@ -1189,7 +1190,10 @@ function MapUploadConfigEditor({ placeholder="e.g. -0.1" value={(config.geofence_lon as number | undefined) ?? ''} onChange={(e) => - onChange({ ...config, geofence_lon: e.target.value === '' ? 0 : parseFloat(e.target.value) }) + onChange({ + ...config, + geofence_lon: e.target.value === '' ? 0 : parseFloat(e.target.value), + }) } /> @@ -1204,7 +1208,10 @@ function MapUploadConfigEditor({ placeholder="e.g. 100" value={(config.geofence_radius_km as number | undefined) ?? ''} onChange={(e) => - onChange({ ...config, geofence_radius_km: e.target.value === '' ? 0 : parseFloat(e.target.value) }) + onChange({ + ...config, + geofence_radius_km: e.target.value === '' ? 0 : parseFloat(e.target.value), + }) } />

diff --git a/tests/test_fanout_integration.py b/tests/test_fanout_integration.py index 9d14400..ae888be 100644 --- a/tests/test_fanout_integration.py +++ b/tests/test_fanout_integration.py @@ -1803,7 +1803,7 @@ class TestMapUploadIntegration: @pytest.mark.asyncio async def test_map_upload_module_loaded_and_receives_raw(self, integration_db): """Enabled map_upload config is loaded by the manager and its on_raw is called.""" - from unittest.mock import AsyncMock, MagicMock, patch + from unittest.mock import AsyncMock, patch cfg = await FanoutConfigRepository.create( config_type="map_upload", @@ -1829,7 +1829,7 @@ class TestMapUploadIntegration: "observation_id": 1, } - with patch.object(module, "_upload", new_callable=AsyncMock) as mock_upload: + with patch.object(module, "_upload", new_callable=AsyncMock): # Provide a parseable but minimal packet so on_raw gets past hex decode; # parse_packet/parse_advertisement returning None is fine — on_raw silently exits await manager.broadcast_raw(advert_data) diff --git a/tests/test_map_upload.py b/tests/test_map_upload.py index fceb3b3..e7cdf9b 100644 --- a/tests/test_map_upload.py +++ b/tests/test_map_upload.py @@ -8,14 +8,13 @@ from unittest.mock import AsyncMock, MagicMock, PropertyMock, patch import pytest from app.fanout.map_upload import ( - MapUploadModule, _DEFAULT_API_URL, _REUPLOAD_SECONDS, + MapUploadModule, _get_radio_params, _haversine_km, ) - # --------------------------------------------------------------------------- # Helpers # --------------------------------------------------------------------------- @@ -898,8 +897,6 @@ class TestGeofence: @pytest.mark.asyncio async def test_dry_run_geofence_logs_distance(self): """dry_run + geofence_enabled must include the calculated distance in the log line.""" - import logging - mod = _make_module({ "dry_run": True, "geofence_enabled": True,