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

More messaging -> packets cleanup

Fixed the unit tests and the notify plugin
This commit is contained in:
2022-12-16 15:28:31 -05:00
parent bfc0a5a1e9
commit 6030cb394b
8 changed files with 49 additions and 196 deletions
+6 -5
View File
@@ -2,7 +2,8 @@ import unittest
from unittest import mock
from aprsd import config as aprsd_config
from aprsd import messaging, packets, stats
from aprsd import packets, stats
from aprsd.packets import core
from . import fake
@@ -18,7 +19,7 @@ class TestPlugin(unittest.TestCase):
stats.APRSDStats._instance = None
packets.WatchList._instance = None
packets.SeenList._instance = None
messaging.MsgTrack._instance = None
packets.PacketTrack._instance = None
self.config = None
def config_and_init(self, config=None):
@@ -34,7 +35,7 @@ class TestPlugin(unittest.TestCase):
stats.APRSDStats(self.config)
packets.WatchList(config=self.config)
packets.SeenList(config=self.config)
messaging.MsgTrack(config=self.config)
packets.PacketTrack(config=self.config)
class TestPluginBase(TestPlugin):
@@ -89,7 +90,7 @@ class TestPluginBase(TestPlugin):
packet = fake.fake_packet(
message="F",
message_format=packets.PACKET_TYPE_MICE,
message_format=core.PACKET_TYPE_MICE,
)
expected = None
actual = p.filter(packet)
@@ -98,7 +99,7 @@ class TestPluginBase(TestPlugin):
packet = fake.fake_packet(
message="f",
message_format=packets.PACKET_TYPE_ACK,
message_format=core.PACKET_TYPE_ACK,
)
expected = None
actual = p.filter(packet)