1
0
mirror of https://github.com/craigerl/aprsd.git synced 2026-06-02 14:14:42 -04:00

remove py310 testing

This commit is contained in:
2025-12-29 19:38:14 -05:00
parent d58700b9e4
commit f9979fa3da
8 changed files with 40 additions and 47 deletions
+18 -24
View File
@@ -80,19 +80,16 @@ class TestDupePacketFilter(unittest.TestCase):
packet.processed = True
packet.timestamp = 1000
with mock.patch(
'aprsd.packets.filters.dupe_filter.packets.PacketList'
) as mock_list:
mock_list_instance = mock.MagicMock()
found_packet = fake.fake_packet(msg_number='123')
found_packet.timestamp = 1050 # Within 60 second timeout
mock_list_instance.find.return_value = found_packet
mock_list.return_value = mock_list_instance
mock_list_instance = mock.MagicMock()
found_packet = fake.fake_packet(msg_number='123')
found_packet.timestamp = 1050 # Within 60 second timeout
mock_list_instance.find.return_value = found_packet
self.filter.pl = mock_list_instance
with mock.patch('aprsd.packets.filters.dupe_filter.LOG') as mock_log:
result = self.filter.filter(packet)
self.assertIsNone(result) # Should be dropped
mock_log.warning.assert_called()
with mock.patch('aprsd.packets.filters.dupe_filter.LOG') as mock_log:
result = self.filter.filter(packet)
self.assertIsNone(result) # Should be dropped
mock_log.warning.assert_called()
def test_filter_duplicate_after_timeout(self):
"""Test filter() with duplicate after timeout."""
@@ -105,16 +102,13 @@ class TestDupePacketFilter(unittest.TestCase):
packet.processed = True
packet.timestamp = 2000
with mock.patch(
'aprsd.packets.filters.dupe_filter.packets.PacketList'
) as mock_list:
mock_list_instance = mock.MagicMock()
found_packet = fake.fake_packet(msg_number='123')
found_packet.timestamp = 1000 # More than 60 seconds ago
mock_list_instance.find.return_value = found_packet
mock_list.return_value = mock_list_instance
mock_list_instance = mock.MagicMock()
found_packet = fake.fake_packet(msg_number='123')
found_packet.timestamp = 1000 # More than 60 seconds ago
mock_list_instance.find.return_value = found_packet
self.filter.pl = mock_list_instance
with mock.patch('aprsd.packets.filters.dupe_filter.LOG') as mock_log:
result = self.filter.filter(packet)
self.assertEqual(result, packet) # Should pass
mock_log.warning.assert_called()
with mock.patch('aprsd.packets.filters.dupe_filter.LOG') as mock_log:
result = self.filter.filter(packet)
self.assertEqual(result, packet) # Should pass
mock_log.warning.assert_called()