예제 #1
0
    def setUp(self):

        factory = BeepServerFactory()
        factory.addProfile(echoprofile)
        reactor.listenTCP(1976, factory, interface='127.0.0.1')
        self.client = dummyclient.DummyClient()
        reactor.iterate()
예제 #2
0
    def setUp(self):
        ## We first have to create our test keys
        import os

        os.system("python ./createTLSTestKeyCerts.py")

        factory = TestTLSServerFactory()
        factory.addProfile(echoprofile)
        factory.addProfile(tlsprofile)
        factory.privateKeyFileName = "serverKey.pem"
        factory.certificateFileName = "serverCert.pem"
        reactor.listenTCP(1976, factory, interface="127.0.0.1")
        reactor.iterate()
예제 #3
0
    def setUp(self):
        factory = SASLOTPServerFactory()
        factory.addProfile(echoprofile)
        factory.addProfile(saslotpprofile)
        reactor.listenTCP(1976, factory, interface="127.0.0.1")

        ## We create a new testing OTP database for
        ## testing the library. This assumes the server
        ## is running in the same directory as this tester
        generator = saslotpprofile.OTPGenerator()
        username = "******"
        seed = "TeSt"
        passphrase = "This is a test"
        algo = "md5"
        sequence = 99

        passhash = generator.createOTP(username, algo, seed, passphrase, sequence)
예제 #4
0
 def setUp(self):
     factory = SASLAnonServerFactory()
     factory.addProfile(echoprofile)
     factory.addProfile(saslanonymousprofile)        
     reactor.listenTCP(1976, factory, interface='127.0.0.1')
예제 #5
0
    def setUp(self):
        factory = InitTestServerFactory()
#        factory.addProfile(echoprofile)
        reactor.listenTCP(1976, factory, interface='127.0.0.1')