Awesome IRC bot
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
975 B

import pytest
from tests.lib import * # NOQA - fixtures
from unittest.mock import call
def helpbot(fakebot):
Provide a bot loaded with the ModInfo module
return fakebot
def test_helpindex(helpbot):
helpbot.act_PRIVMSG.assert_called_once_with('#test', 'chatter: commands: .help, .helpindex')
def test_help(helpbot):
helpbot.act_PRIVMSG.assert_has_calls([call('#test', 'ModInfo: .help [command] show the manual for all or [commands]'),
call('#test', 'ModInfo: .helpindex show a short list of all commands')],
def test_help_one(helpbot):
helpbot.feed_line(".help .helpindex")
helpbot.act_PRIVMSG.assert_called_once_with('#test', 'RTFM: .helpindex: helpindex show a short list of all commands')