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)
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)
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)
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)
def setUpPostSession(self): TestAsServer.setUpPostSession(self) time.sleep(2)
def setUpPostSession(self): TestAsServer.setUpPostSession(self)