コード例 #1
0
ファイル: test_bot.py プロジェクト: ryanmaclean/irc3
 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')
コード例 #2
0
ファイル: test_bot.py プロジェクト: AMorporkian/irc3
 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')
コード例 #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'])
コード例 #4
0
ファイル: test_social.py プロジェクト: AMorporkian/irc3
    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'])
コード例 #5
0
ファイル: test_commands.py プロジェクト: valhallasw/irc3
 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.'])
コード例 #6
0
ファイル: test_commands.py プロジェクト: pypingou/irc3
 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.'])