def setUp(self): self.realm = FakeFRealm() self.bouncer = self.bouncerClass(self.bouncerConf) self.portal = fportal.BouncerPortal(self.realm, self.bouncer) self.serverFactory = tpb.PBServerFactory(self.portal, unsafeTracebacks=0) self.port = reactor.listenTCP(0, self.serverFactory, interface="127.0.0.1") self.portno = self.port.getHost().port
def listen(self, bouncer, portNum, unsafeTracebacks=0): portal = fportal.BouncerPortal(self, bouncer) factory = pb.PBServerFactory(portal, unsafeTracebacks=unsafeTracebacks) tport = reactor.listenWith(fdserver.PassableServerPort, portNum, factory) self._tport = tport self.debug('Listening for feed requests on TCP port %d', self.getPortNum())
def setUp(self): self.bouncerPortal = fportal.BouncerPortal(FakeFRealm(), 'bouncer') self.root = pb._FPortalRoot(self.bouncerPortal)
def setUp(self): broker = FakeBroker() self.bouncer = htpasswdcrypt.HTPasswdCrypt(htpasswdcryptConf) self.bouncerPortal = fportal.BouncerPortal(FakeFRealm(), self.bouncer) self.wrapper = pb._BouncerWrapper(self.bouncerPortal, broker)
def getFactory(self): self._bouncer = htpasswdcrypt.HTPasswdCrypt(self.bouncerconf) portal = fportal.BouncerPortal(self, self._bouncer) return pb.PBServerFactory(portal, unsafeTracebacks=1)