def test_plugin(self): bot = self.callFTU() bot.include('irc3.plugins.command') plugin = bot.get_plugin(u('irc3.plugins.command.Commands')) self.assertTrue(plugin is not None) plugin = bot.get_plugin('irc3.plugins.command.Commands') self.assertTrue(plugin is not None) self.assertRaises(LookupError, bot.get_plugin, 'irc3.plugins.log.RawLog')
def test_tweet(self, c): bot = self.callFTU() bot.dispatch(u(':bar!a@b PRIVMSG irc3 :!tweet yé')) self.assertSent(['PRIVMSG bar :twitter success']) bot.dispatch(':bar!a@b PRIVMSG irc3 :!tweet --id=twitter yo') self.assertSent(['PRIVMSG bar :twitter success']) bot.dispatch(':bar!a@b PRIVMSG irc3 :!tweet --id=tw yo') self.assertSent(['PRIVMSG bar :tw is an invalid id. Use twitter'])
def test_unicode(self): bot = self.callFTU(nick='nono') bot.dispatch(u(':bar!user@host PRIVMSG nono :!ping eé')) self.assertSent(['PRIVMSG bar :Invalid arguments.'])