1
0
mirror of https://github.com/craigerl/aprsd.git synced 2026-06-04 23:24:55 -04:00

Added unit tests for log

This commit is contained in:
2026-01-06 18:57:54 -05:00
parent 8a82a62dc9
commit 26242f7d43
6 changed files with 55 additions and 15 deletions
+2 -1
View File
@@ -261,10 +261,11 @@ class TestAPRSDFilterThread(unittest.TestCase):
def test_print_packet(self):
"""Test print_packet() method."""
packet = fake.fake_packet()
self.filter_thread.packet_count = 5 # Set a packet count
with mock.patch('aprsd.threads.rx.packet_log') as mock_log:
self.filter_thread.print_packet(packet)
mock_log.log.assert_called_with(packet)
mock_log.log.assert_called_with(packet, packet_count=5)
def test_loop_with_packet(self):
"""Test loop() with packet in queue."""