mirror of
https://github.com/hemna/aprsd-slack-plugin.git
synced 2026-07-29 21:34:07 -04:00
Initial commit
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import sys
|
||||
import unittest
|
||||
|
||||
from aprsd_slack_plugin import aprsd_slack_plugin as slack_plugin
|
||||
|
||||
if sys.version_info >= (3, 2):
|
||||
from unittest import mock
|
||||
else:
|
||||
import mock
|
||||
|
||||
|
||||
class TestPlugin(unittest.TestCase):
|
||||
@mock.patch.object(slack_plugin.SlackCommandPlugin, "command")
|
||||
def test_plugin(self, mock_command):
|
||||
mock_command.return_value = ""
|
||||
|
||||
config = {
|
||||
"slack": {"signing_secret": "something", "bot_token": "sometoken", "channel": "hemna"}
|
||||
}
|
||||
|
||||
p = slack_plugin.SlackCommandPlugin(config)
|
||||
p.command("KM6LYW", "location", 1)
|
||||
Reference in New Issue
Block a user