Пример #1
0
 def setUpPostSession(self):
     TestAsServer.setUpPostSession(self)
     
     #CMD = "START tswift:/"+binascii.hexlify(self.swarmid)+" "+self.destdir+"\r\n"
     CMD = "START tswift://127.0.0.1:"+str(self.listenport)+"/"+binascii.hexlify(self.swarmid)+" "+self.destdir+"\r\n"
     self.cmdsock.send(CMD)
     
     self.urlprefix = "http://127.0.0.1:"+str(self.httpport)+"/"+binascii.hexlify(self.swarmid)
Пример #2
0
    def setUpPostSession(self):
        TestAsServer.setUpPostSession(self)

        #CMD = "START tswift:/"+binascii.hexlify(self.swarmid)+" "+self.destdir+"\r\n"
        CMD = "START tswift://127.0.0.1:" + str(
            self.listenport) + "/" + binascii.hexlify(
                self.swarmid) + " " + self.destdir + "\r\n"
        self.cmdsock.send(CMD)

        self.urlprefix = "http://127.0.0.1:" + str(
            self.httpport) + "/" + binascii.hexlify(self.swarmid)
Пример #3
0
    def setUpPostSession(self):
        TestAsServer.setUpPostSession(self)

        f = open(self.urlfilename,"rb")
        swarmurl = f.read()
        f.close()
        swarmurl = swarmurl.strip()
        idx = swarmurl.find("/")
        if idx == -1:
            self.assertFalse(True)
        else:
            liveswarmidhex = swarmurl[idx+1:]
            print >>sys.stderr,"test: SwarmID <"+liveswarmidhex+">"
            self.liveswarmid = binascii.unhexlify(liveswarmidhex)
Пример #4
0
    def setUpPostSession(self):
        TestAsServer.setUpPostSession(self)

        f = open(self.urlfilename, "rb")
        swarmurl = f.read()
        f.close()
        swarmurl = swarmurl.strip()
        idx = swarmurl.find("/")
        if idx == -1:
            self.assertFalse(True)
        else:
            liveswarmidhex = swarmurl[idx + 1:]
            print >> sys.stderr, "test: SwarmID <" + liveswarmidhex + ">"
            self.liveswarmid = binascii.unhexlify(liveswarmidhex)
Пример #5
0
    def setUpPostSession(self):
        TestAsServer.setUpPostSession(self)

        time.sleep(2)
Пример #6
0
 def setUpPostSession(self):
     TestAsServer.setUpPostSession(self)
Пример #7
0
 def setUpPostSession(self):
     TestAsServer.setUpPostSession(self)
Пример #8
0
 def setUpPostSession(self):
     TestAsServer.setUpPostSession(self)
     
     time.sleep(2)