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())