def setUp(self): self.conn = Queue.Queue() self.conn.out = '' self.wrapper = IrcWrapper(self.conn, 'test', 'tester', None, ['#test'], None) self.assertTrue(self.wrapper.nick == 'test') self.assertTrue(self.wrapper.realname == 'tester') self.assertTrue(self.wrapper.channels == ['#test'])
def _create_connection(self): self.connection = TcpClient(self.config['SERVER'], self.config['PORT'], self.config['SSL'], self.config['TIMEOUT'], logger=self.logger) self.irc = IrcWrapper(self.connection, self.config['NICK'], self.config['REALNAME'], self.config['PASSWORD'], self.config['CHANNELS'], logger=self.logger, user=self.config['USER'])