]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
remove some no-longer needed replacements of "/" with "!" in uris
authorZooko O'Whielacronx <zooko@zooko.com>
Thu, 20 Dec 2007 00:54:40 +0000 (17:54 -0700)
committerZooko O'Whielacronx <zooko@zooko.com>
Thu, 20 Dec 2007 00:54:40 +0000 (17:54 -0700)
extensions/tahoe-fuse.py
src/allmydata/test/test_system.py
src/allmydata/test/test_web.py

index 11b62d573d412fa1b74adc5f63b3adb942fdac44..919ec476dc641ef1c7f85e1499a0798c261d852e 100644 (file)
@@ -254,7 +254,7 @@ class TahoeNode (object):
     def __init__(self, baseurl, uri):
         self.burl = baseurl
         self.uri = uri
-        self.fullurl = '%s/uri/%s' % (self.burl, self.uri.replace('/', '!'))
+        self.fullurl = '%s/uri/%s' % (self.burl, self.uri)
         self.inode = TahoeNode.NextInode
         TahoeNode.NextInode += 1
 
index 9f200daed7112f10dcd61d3c9cfdf240241ea3a1..465f4175068283be30178a79c588c1c5ed2ce78f 100644 (file)
@@ -829,7 +829,7 @@ class SystemTest(testutil.SignalMixin, unittest.TestCase):
 
     def _test_web(self, res):
         base = self.webish_url
-        public = "uri/" + self._root_directory_uri.replace("/", "!")
+        public = "uri/" + self._root_directory_uri
         d = getPage(base)
         def _got_welcome(page):
             expected = "Connected Peers: <span>%d</span>" % (self.numclients)
@@ -924,7 +924,7 @@ class SystemTest(testutil.SignalMixin, unittest.TestCase):
         self.failUnless(self.webish_url in start_html)
         d = self.clients[0].get_private_uri()
         def done(private_uri):
-            private_url = self.webish_url + "uri/" + private_uri.replace("/","!")
+            private_url = self.webish_url + "uri/" + private_uri
             self.failUnless(private_url in start_html)
         d.addCallback(done)
         return d
index ef54d04518b30842d2a8337062f4c3932197f401..fd270ce2c813816f0a7a06652581516965d7e892 100644 (file)
@@ -1318,7 +1318,7 @@ class Web(WebMixin, unittest.TestCase):
         return res
 
     def test_GET_URI_URL(self):
-        base = "/uri/%s" % self._bar_txt_uri.replace("/","!")
+        base = "/uri/%s" % self._bar_txt_uri
         d = self.GET(base)
         d.addCallback(self.failUnlessIsBarDotTxt)
         d.addCallback(lambda res: self.GET(base+"?filename=bar.txt"))
@@ -1328,13 +1328,13 @@ class Web(WebMixin, unittest.TestCase):
         return d
 
     def test_GET_URI_URL_dir(self):
-        base = "/uri/%s?t=json" % self._foo_uri.replace("/","!")
+        base = "/uri/%s?t=json" % self._foo_uri
         d = self.GET(base)
         d.addCallback(self.failUnlessIsFooJSON)
         return d
 
     def test_GET_URI_URL_missing(self):
-        base = "/uri/%s" % self._bad_file_uri.replace("/","!")
+        base = "/uri/%s" % self._bad_file_uri
         d = self.GET(base)
         d.addBoth(self.shouldHTTPError, "test_GET_URI_URL_missing",
                   http.GONE, response_substring="NotEnoughPeersError")
@@ -1378,7 +1378,7 @@ class Web(WebMixin, unittest.TestCase):
             self.failUnless(uri in FakeCHKFileNode.all_contents)
             self.failUnlessEqual(FakeCHKFileNode.all_contents[uri],
                                  file_contents)
-            return self.GET("/uri/%s" % uri.replace("/","!"))
+            return self.GET("/uri/%s" % uri)
         d.addCallback(_check)
         def _check2(res):
             self.failUnlessEqual(res, file_contents)
@@ -1399,7 +1399,7 @@ class Web(WebMixin, unittest.TestCase):
             n = self.s.create_node_from_uri(uri.strip())
             d2 = self.failUnlessNodeKeysAre(n, [])
             d2.addCallback(lambda res:
-                           self.GET("/uri/%s?t=json" % uri.replace("/","!")))
+                           self.GET("/uri/%s?t=json" % uri))
             return d2
         d.addCallback(_check)
         d.addCallback(self.failUnlessIsEmptyJSON)