示例#1
0
 def test_sent_messages(self):
     botcode.join_irc(self.ircsock)
     expected = [
         "USER WelcomeBot2 WelcomeBot2 WelcomeBot2 :This is http://openhatch.org/'s greeter bot.\n",
         'NICK WelcomeBot2\n', 'JOIN #openhatch-bots \n'
     ]
     self.assertEqual(self.ircsock.sent_messages, expected)
示例#2
0
 def test_sent_messages(self):
     botcode.join_irc(self.ircsock, settings.botnick, settings.channel)
     expected = [
         "USER {} {} {} :This is http://openhatch.org/'s greeter bot.\n".
         format(self.bot.botnick, self.bot.botnick,
                self.bot.botnick), 'NICK {}\n'.format(self.bot.botnick),
         'JOIN {} \n'.format(settings.channel)
     ]
     self.assertEqual(self.ircsock.sent_messages, expected)
示例#3
0
 def test_sent_messages(self):
     botcode.join_irc(self.ircsock)
     expected = ["USER WelcomeBot2 WelcomeBot2 WelcomeBot2 :This is http://openhatch.org/'s greeter bot.\n", 'NICK WelcomeBot2\n', 'JOIN #openhatch-bots \n']
     self.assertEqual(self.ircsock.sent_messages,expected)
示例#4
0
 def test_sent_messages(self):
     botcode.join_irc(self.ircsock, settings.botnick, settings.channel)
     expected = ["USER {} {} {} :This is http://openhatch.org/'s greeter bot.\n".format(self.bot.botnick, self.bot.botnick, self.bot.botnick), 'NICK {}\n'.format(self.bot.botnick), 'JOIN {} \n'.format(settings.channel)]
     self.assertEqual(self.ircsock.sent_messages,expected)