Beispiel #1
0
    def setUp(self):
        """ override TestAsServer """
        print >>sys.stderr,time.asctime(),'-', "test: *** setup friendship"
        TestAsServer.setUp(self)

        self.usercallbackexpected = True
        self.usercallbackreceived = False
 def setUp(self):
     """ override TestAsServer """
     TestAsServer.setUp(self)
     print >>sys.stderr,"test: Giving Session time to startup"
     time.sleep(5)
     print >>sys.stderr,"test: Session should have started up"
     self.vod_started = False
 def setUp(self):
     """ override TestAsServer """
     TestAsServer.setUp(self)
     print >>sys.stderr,time.asctime(),'-', "test: Giving Session time to startup"
     time.sleep(5)
     print >>sys.stderr,time.asctime(),'-', "test: Session should have started up"
     self.vod_started = False
    def setUp(self):
        """ override TestAsServer """
        print >>sys.stderr,"test: *** setup friendship"
        TestAsServer.setUp(self)

        self.usercallbackexpected = True
        self.usercallbackreceived = False
Beispiel #5
0
 def setUp(self):
     """ override TestAsServer """
     TestAsServer.setUp(self)
     print >>sys.stderr,time.asctime(),'-', "test: Giving MyLaunchMany time to startup"
     time.sleep(5)
     print >>sys.stderr,time.asctime(),'-', "test: MyLaunchMany should have started up"
 
     # the metadata that we want to transfer
     self.tdef = TorrentDef()
     self.tdef.add_content(os.path.join(os.getcwd(), "API", "file.wmv"))
     self.tdef.set_tracker(self.session.get_internal_tracker_url())
     # we use a small piece length to obtain multiple pieces
     self.tdef.set_piece_length(1) 
     self.tdef.finalize()
     # self.tdef.save(os.path.join(self.session.get_state_dir(), "gen.torrent"))
     
     MagnetHelpers.__init__(self, self.tdef)
Beispiel #6
0
    def setUp(self):
        """ override TestAsServer """
        # listener for incoming connections from MiniBitTorrent
        self.server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        self.server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
        self.server.bind(("localhost", LISTEN_PORT))
        self.server.listen(1)

        # the metadata that we want to transfer
        self.tdef = TorrentDef()
        self.tdef.add_content(os.path.join(os.getcwd(), "API", "file.wmv"))
        self.tdef.set_tracker("http://fake.net/announce")
        # we use a small piece length to obtain multiple pieces
        self.tdef.set_piece_length(1) 
        self.tdef.finalize()

        MagnetHelpers.__init__(self, self.tdef)

        # startup the client
        TestAsServer.setUp(self)
        print >>sys.stderr,time.asctime(),'-', "test: Giving MyLaunchMany time to startup"
        time.sleep(5)
        print >>sys.stderr,time.asctime(),'-', "test: MyLaunchMany should have started up"
 def setUp(self):
     """ override TestAsServer """
     TestAsServer.setUp(self)
     Rand.load_file('randpool.dat', -1)
Beispiel #8
0
 def setUp(self):
     """ override TestAsServer """
     TestAsServer.setUp(self)
     print >> sys.stderr, "test: Giving MyLaunchMany time to startup"
     time.sleep(3)
     print >> sys.stderr, "test: MyLaunchMany should have started up"
Beispiel #9
0
 def setUp(self):
     """ override TestAsServer """
     TestAsServer.setUp(self)
     print >>sys.stderr,time.asctime(),'-', "test: Giving MyLaunchMany time to startup"
     time.sleep(3)
     print >>sys.stderr,time.asctime(),'-', "test: MyLaunchMany should have started up"
 def setUp(self):
     """ override TestAsServer """
     TestAsServer.setUp(self)
     print >>sys.stderr,"test: Giving Session time to startup"
     time.sleep(5)
     print >>sys.stderr,"test: Session should have started up"
 def setUp(self):
     """ override TestAsServer """
     TestAsServer.setUp(self)
 def setUp(self):
     """ override TestAsServer """
     print >> sys.stderr,"test: Setup"
     self.NLISTENERS=1
     TestAsServer.setUp(self)
Beispiel #13
0
 def setUp(self):
     """ override TestAsServer """
     TestAsServer.setUp(self)
     self.vodstarted = False
 def setUp(self):
     """ override TestAsServer """
     TestAsServer.setUp(self)
     Rand.load_file('randpool.dat', -1)
 def setUp(self):
     """ override TestAsServer """
     print >> sys.stderr, "test: Setup"
     self.NLISTENERS = 1
     TestAsServer.setUp(self)