Fix issues identified in failing checks

This commit is contained in:
Kizniche
2026-03-25 19:06:33 -04:00
parent bab1693c82
commit b7972f50a8
3 changed files with 15 additions and 11 deletions
+2 -2
View File
@@ -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)
+1 -4
View File
@@ -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,