aprsd-slack-plugin/tests/test_plugin.py

18 lines
510 B
Python
Raw Normal View History

2020-12-14 09:50:39 -05:00
import unittest
2022-12-18 13:12:49 -05:00
from unittest import mock
2020-12-14 09:50:39 -05:00
from aprsd import conf # noqa
from aprsd_slack_plugin import conf as plugin_conf # noqa
2021-06-17 13:32:55 -04:00
from aprsd_slack_plugin import location_plugin
2020-12-14 09:50:39 -05:00
2022-12-18 13:03:25 -05:00
2020-12-14 09:50:39 -05:00
class TestPlugin(unittest.TestCase):
2022-12-18 13:03:25 -05:00
@mock.patch.object(location_plugin.SlackLocationPlugin, "filter")
2020-12-14 09:50:39 -05:00
def test_plugin(self, mock_command):
mock_command.return_value = ""
p = location_plugin.SlackLocationPlugin()
2022-12-18 13:03:25 -05:00
packet = {"from": "WB4BOR", "message_text": "location"}
p.filter(packet)