aprsd-slack-plugin/tests/test_plugin.py
2022-12-18 13:18:32 -05:00

19 lines
555 B
Python

import unittest
from unittest import mock
from aprsd_slack_plugin import location_plugin
class TestPlugin(unittest.TestCase):
@mock.patch.object(location_plugin.SlackLocationPlugin, "filter")
def test_plugin(self, mock_command):
mock_command.return_value = ""
config = {
"slack": {"signing_secret": "something", "bot_token": "sometoken", "channel": "hemna"},
}
p = location_plugin.SlackLocationPlugin(config)
packet = {"from": "WB4BOR", "message_text": "location"}
p.filter(packet)