ModInfo test
This commit is contained in:
parent
a77bde4288
commit
3b6d4ff33d
|
@ -235,7 +235,6 @@ class command(hook):
|
||||||
for keyword in self.keywords:
|
for keyword in self.keywords:
|
||||||
single = self._validate_prefixedcommand(msg, keyword, bot_nick)
|
single = self._validate_prefixedcommand(msg, keyword, bot_nick)
|
||||||
if single:
|
if single:
|
||||||
print(single)
|
|
||||||
return single
|
return single
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
|
@ -19,11 +19,13 @@ def test_helpindex(helpbot):
|
||||||
|
|
||||||
def test_help(helpbot):
|
def test_help(helpbot):
|
||||||
helpbot.feed_line(".help")
|
helpbot.feed_line(".help")
|
||||||
helpbot.act_PRIVMSG.assert_has_calls([call('#test', 'ModInfo: .help [command] show the manual for all or [commands]'),
|
helpbot.act_PRIVMSG.assert_has_calls(
|
||||||
call('#test', 'ModInfo: .helpindex show a short list of all commands')],
|
[call('#test', 'ModInfo .help [command] show the manual for all or [commands] '),
|
||||||
any_order=True)
|
call('#test', 'ModInfo .helpindex show a short list of all commands ')],
|
||||||
|
any_order=True)
|
||||||
|
|
||||||
|
|
||||||
def test_help_one(helpbot):
|
def test_help_one(helpbot):
|
||||||
helpbot.feed_line(".help .helpindex")
|
helpbot.feed_line(".help .helpindex")
|
||||||
helpbot.act_PRIVMSG.assert_called_once_with('#test', 'RTFM: .helpindex: helpindex show a short list of all commands')
|
helpbot.act_PRIVMSG.assert_called_once_with('#test',
|
||||||
|
'RTFM: .helpindex: (.helpindex) show a short list of all commands')
|
||||||
|
|
Loading…
Reference in New Issue