def run_bot(): from jeeves.conf import settings from jeeves.core.bot import BotFactory factory = BotFactory(channel=settings.CHANNEL, nickname=settings.NICKNAME, password=settings.PASSWORD) if settings.SSL == True: if ssl: reactor.connectSSL(settings.HOST, settings.PORT, factory, ssl.ClientContextFactory()) else: print "Unable to establish an SSL connection." else: reactor.connectTCP(settings.HOST, settings.PORT, factory) reactor.run()
def setUp(self): super(PluginsTestSuite, self).setUp() factory = BotFactory(CHANNEL, USERNAME, None) self.bot = factory.buildProtocol(None)
def setUp(self): super(JeevesTestSuite, self).setUp() factory = BotFactory(settings) self.bot = factory.buildProtocol(None)