Example #1
0
 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')
Example #2
0
 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')
Example #3
0
    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'])
Example #4
0
    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'])
Example #5
0
 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.'])
Example #6
0
 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.'])