示例#1
0
 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
示例#2
0
    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())
示例#3
0
 def setUp(self):
     self.bouncerPortal = fportal.BouncerPortal(FakeFRealm(), 'bouncer')
     self.root = pb._FPortalRoot(self.bouncerPortal)
示例#4
0
    def setUp(self):
        broker = FakeBroker()

        self.bouncer = htpasswdcrypt.HTPasswdCrypt(htpasswdcryptConf)
        self.bouncerPortal = fportal.BouncerPortal(FakeFRealm(), self.bouncer)
        self.wrapper = pb._BouncerWrapper(self.bouncerPortal, broker)
示例#5
0
    def getFactory(self):
        self._bouncer = htpasswdcrypt.HTPasswdCrypt(self.bouncerconf)

        portal = fportal.BouncerPortal(self, self._bouncer)
        return pb.PBServerFactory(portal, unsafeTracebacks=1)