def test_template(self): main(nick='mybot') files = sorted(os.listdir(self.wd)) assert files == ['config.ini', 'mybot_plugin.py'] config = utils.parse_config('bot', 'config.ini') bot = self.callFTU(**config) bot.dispatch(':gawel!n@h JOIN #mybot') self.assertSent(['PRIVMSG #mybot :Hi gawel!']) bot.dispatch(':yournick!n@h PRIVMSG #mybot :!echo Hi!') self.assertSent(['PRIVMSG #mybot :Hi!'])
# -*- coding: utf-8 -*- from irc3.template import main if __name__ == '__main__': main()