Skip to content

Commit

Permalink
Fix kwargs unit test
Browse files Browse the repository at this point in the history
* Fix typo on testing module's filename.
* Fix category on testing message.
  • Loading branch information
tribela committed Apr 12, 2017
1 parent 0f5fe91 commit 9303d07
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from slackbot.bot import respond_to


@respond_to('Hello, (?P<name>.+)')
def say_hello(message, name):
message.reply('Hello! {}'.format(name))
6 changes: 3 additions & 3 deletions tests/unit/test_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'}

0 comments on commit 9303d07

Please sign in to comment.