diff --git a/tests/test_engine.py b/tests/test_engine.py index d5aa5d3..c5dedea 100644 --- a/tests/test_engine.py +++ b/tests/test_engine.py @@ -7,11 +7,7 @@ airtime duty-cycle, TX mode (forward/monitor/no_tx), and config reloading. """ import asyncio import base64 -import copy -import math import time -from collections import OrderedDict -from typing import Optional from unittest.mock import AsyncMock, MagicMock, patch import pytest diff --git a/tests/test_flood_loop_dedup.py b/tests/test_flood_loop_dedup.py index 76c2b2a..dfc6b0d 100644 --- a/tests/test_flood_loop_dedup.py +++ b/tests/test_flood_loop_dedup.py @@ -13,11 +13,9 @@ objects to verify: """ from unittest.mock import MagicMock, patch -import pytest from pymc_core.protocol import Packet, PathUtils from pymc_core.protocol.constants import ( - MAX_PATH_SIZE, ROUTE_TYPE_FLOOD, ROUTE_TYPE_TRANSPORT_FLOOD, ) diff --git a/tests/test_handler_helpers_mesh_cli.py b/tests/test_handler_helpers_mesh_cli.py index 5fcd27c..2e82d9d 100644 --- a/tests/test_handler_helpers_mesh_cli.py +++ b/tests/test_handler_helpers_mesh_cli.py @@ -1,7 +1,6 @@ from types import SimpleNamespace from unittest.mock import MagicMock, patch -import pytest from repeater.handler_helpers.mesh_cli import MeshCLI diff --git a/tests/test_handler_helpers_room_server.py b/tests/test_handler_helpers_room_server.py index 36ff146..1332f0c 100644 --- a/tests/test_handler_helpers_room_server.py +++ b/tests/test_handler_helpers_room_server.py @@ -1,4 +1,3 @@ -import asyncio import time from types import SimpleNamespace from unittest.mock import AsyncMock, MagicMock, patch diff --git a/tests/test_http_server_unit.py b/tests/test_http_server_unit.py index 757e54a..6f4d788 100644 --- a/tests/test_http_server_unit.py +++ b/tests/test_http_server_unit.py @@ -2,7 +2,6 @@ import io import logging from pathlib import Path from types import SimpleNamespace -from unittest.mock import MagicMock import cherrypy import pytest diff --git a/tests/test_identity_manager_and_repeater_cli.py b/tests/test_identity_manager_and_repeater_cli.py index ce149d3..20df1b5 100644 --- a/tests/test_identity_manager_and_repeater_cli.py +++ b/tests/test_identity_manager_and_repeater_cli.py @@ -1,7 +1,5 @@ -from types import SimpleNamespace from unittest.mock import MagicMock, patch -import pytest from repeater.handler_helpers.repeater_cli import MeshCLI, RepeaterCLI from repeater.identity_manager import IdentityManager diff --git a/tests/test_keygen_local_cli.py b/tests/test_keygen_local_cli.py index 7ecc1f6..639c74e 100644 --- a/tests/test_keygen_local_cli.py +++ b/tests/test_keygen_local_cli.py @@ -1,7 +1,6 @@ import hashlib import json -from pathlib import Path -from unittest.mock import MagicMock, patch +from unittest.mock import patch import pytest diff --git a/tests/test_main_py_coverage.py b/tests/test_main_py_coverage.py index 199caeb..e7e832a 100644 --- a/tests/test_main_py_coverage.py +++ b/tests/test_main_py_coverage.py @@ -1,4 +1,3 @@ -import asyncio from types import SimpleNamespace from unittest.mock import AsyncMock, MagicMock, patch diff --git a/tests/test_mqtt_publish_integration.py b/tests/test_mqtt_publish_integration.py index d22ccd8..9099922 100644 --- a/tests/test_mqtt_publish_integration.py +++ b/tests/test_mqtt_publish_integration.py @@ -11,7 +11,6 @@ to end. paho-mqtt's network layer is mocked so no real broker is required. """ import json -import math from unittest.mock import MagicMock from repeater.airtime import AirtimeManager diff --git a/tests/test_path_hash_mode_advert.py b/tests/test_path_hash_mode_advert.py index b8aeb17..fc724a5 100644 --- a/tests/test_path_hash_mode_advert.py +++ b/tests/test_path_hash_mode_advert.py @@ -5,7 +5,6 @@ When mesh.path_hash_mode is 1 or 2, flood 0-hop packets (e.g. adverts) sent via dispatcher.send_packet() must have path_len encoding set so get_path_hash_size() returns 2 or 3. The dispatcher applies this in send_packet() before transmit. """ -from unittest.mock import AsyncMock, MagicMock import pytest diff --git a/tests/test_path_hash_protocol.py b/tests/test_path_hash_protocol.py index 2e7ead3..2f93778 100644 --- a/tests/test_path_hash_protocol.py +++ b/tests/test_path_hash_protocol.py @@ -12,7 +12,6 @@ rather than mocking the protocol layer. Covers: - Max-hop boundary enforcement per hash size """ import struct -from collections import OrderedDict from unittest.mock import MagicMock, patch import pytest @@ -23,7 +22,6 @@ from pymc_core.protocol.constants import ( PATH_HASH_COUNT_MASK, PATH_HASH_SIZE_SHIFT, PAYLOAD_TYPE_TRACE, - PH_TYPE_SHIFT, ROUTE_TYPE_DIRECT, ROUTE_TYPE_FLOOD, ) diff --git a/tests/test_update_endpoints_unit.py b/tests/test_update_endpoints_unit.py index be222b9..168e8e8 100644 --- a/tests/test_update_endpoints_unit.py +++ b/tests/test_update_endpoints_unit.py @@ -1,6 +1,5 @@ from datetime import datetime, timedelta, timezone from types import SimpleNamespace -from unittest.mock import patch import cherrypy import pytest