Update dev.py

This patch ensures a valid packet is passed into the plugin prior to
testing.
This commit is contained in:
Hemna 2021-09-03 16:48:00 -04:00
parent 62ce84b315
commit dfaf3aa3d1
1 changed files with 7 additions and 1 deletions

View File

@ -189,8 +189,14 @@ def test_plugin(
pm = plugin.PluginManager(config)
obj = pm._create_class(plugin_path, plugin.APRSDPluginBase, config=config)
login = config["aprs"]["login"]
packet = {"from": fromcall, "message_text": message, "msgNo": 1}
packet = {
"from": fromcall, "addresse": login,
"message_text": message,
"format": "message",
"msgNo": 1,
}
reply = obj.filter(packet)
# Plugin might have threads, so lets stop them so we can exit.