def testCreateTestbedTrackerWithCorrectURL(self):
     trackerConfig = TestbedTrackerConfiguration()
     self.assertEquals("http://localhost:8859/announce",
                       trackerConfig.get_url())
     new_url = "http://anything.com:8859/announce"
     trackerConfig.set_url(new_url)
     self.assertEquals(new_url, trackerConfig.get_url())
 def testCreateTestbedTrackerWithIncorrectURL(self):
     trackerConfig = TestbedTrackerConfiguration()
     correct_url = "http://localhost:8859/announce"
     self.assertEquals(correct_url, trackerConfig.get_url())
     # the following call should not change the URL, since it is not
     # compliant to the required URL pattern
     trackerConfig.set_url("http://lala/announce")
     self.assertEquals(correct_url, trackerConfig.get_url())
 def testCreateTestbedTrackerWithIncorrectURL(self):
     trackerConfig = TestbedTrackerConfiguration()
     correct_url = "http://localhost:8859/announce"
     self.assertEquals(correct_url, trackerConfig.get_url())
     # the following call should not change the URL, since it is not
     # compliant to the required URL pattern
     trackerConfig.set_url("http://lala/announce")
     self.assertEquals(correct_url, trackerConfig.get_url())
 def testCreateTestbedTrackerDefault(self):
     trackerConfig = TestbedTrackerConfiguration()
     
     self.assertEquals(32, trackerConfig.get_uprate())
     self.assertEquals(32, trackerConfig.get_downrate())
     self.assertEquals("http://localhost:8859/announce", trackerConfig.get_url())
     self.assertEquals(32768, trackerConfig.get_piece_length())
    def testCreateTestbedTrackerDefault(self):
        trackerConfig = TestbedTrackerConfiguration()

        self.assertEquals(32, trackerConfig.get_uprate())
        self.assertEquals(32, trackerConfig.get_downrate())
        self.assertEquals("http://localhost:8859/announce",
                          trackerConfig.get_url())
        self.assertEquals(32768, trackerConfig.get_piece_length())
    def testCreateTestbedTracker(self):
        trackerConfig = TestbedTrackerConfiguration(
            64, 64, "http://localhost:8859/announce", 1000)

        self.assertEquals(64, trackerConfig.uprate)
        self.assertEquals(64, trackerConfig.downrate)
        self.assertEquals("http://localhost:8859/announce",
                          trackerConfig.get_url())
        self.assertEquals(1000, trackerConfig.get_piece_length())
 def testCreateTestbedTracker(self):
     trackerConfig = TestbedTrackerConfiguration(64, 
                                                 64, 
                                                 "http://localhost:8859/announce", 
                                                 1000)
     
     self.assertEquals(64, trackerConfig.uprate)
     self.assertEquals(64, trackerConfig.downrate)
     self.assertEquals("http://localhost:8859/announce", trackerConfig.get_url())
     self.assertEquals(1000, trackerConfig.get_piece_length())
 def testCreateTestbedTrackerWithCorrectURL(self):
     trackerConfig = TestbedTrackerConfiguration()
     self.assertEquals("http://localhost:8859/announce", trackerConfig.get_url())
     new_url = "http://anything.com:8859/announce"
     trackerConfig.set_url(new_url)
     self.assertEquals(new_url, trackerConfig.get_url())