diff --git a/tests/unit/kw_arg_plugin_module.py b/tests/unit/kwarg_plugin_module.py similarity index 99% rename from tests/unit/kw_arg_plugin_module.py rename to tests/unit/kwarg_plugin_module.py index ba112693..0d3f0d3d 100644 --- a/tests/unit/kw_arg_plugin_module.py +++ b/tests/unit/kwarg_plugin_module.py @@ -1,5 +1,6 @@ from slackbot.bot import respond_to + @respond_to('Hello, (?P.+)') def say_hello(message, name): message.reply('Hello! {}'.format(name)) diff --git a/tests/unit/test_manager.py b/tests/unit/test_manager.py index b78895ed..fa2f875e 100644 --- a/tests/unit/test_manager.py +++ b/tests/unit/test_manager.py @@ -22,10 +22,10 @@ def test_kwargs(): pm._load_plugins('kwarg_plugin_module') msg = { - 'category': 'default_reply', + 'category': 'respond_to', 'text': 'Hello, Jeong Arm', } - func, args, kwargs = pm.get_plugins(msg['category'], msg['text']) - assert args == () + func, args, kwargs = next(pm.get_plugins(msg['category'], msg['text'])) + assert not args assert kwargs == {'name': 'Jeong Arm'}