]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
test_web.py: hush pyflakes
authorBrian Warner <warner@allmydata.com>
Wed, 6 Feb 2008 05:37:51 +0000 (22:37 -0700)
committerBrian Warner <warner@allmydata.com>
Wed, 6 Feb 2008 05:37:51 +0000 (22:37 -0700)
src/allmydata/test/test_web.py

index af4cb7b3c611702df7eaac946b3b5c447fea88b1..5acb9ec92c496ea9a5cf9070b13331981e72a778 100644 (file)
@@ -1009,12 +1009,12 @@ class Web(WebMixin, unittest.TestCase):
     def test_POST_upload_no_link_mutable(self):
         d = self.POST("/uri", t="upload", mutable="true",
                       file=("new.txt", self.NEWFILE_CONTENTS))
-        def _check(uri):
-            uri = uri.strip()
-            u = IURI(uri)
+        def _check(new_uri):
+            new_uri = new_uri.strip()
+            u = IURI(new_uri)
             self.failUnless(IMutableFileURI.providedBy(u))
             self.failUnless(u.storage_index in FakeMutableFileNode.all_contents)
-            n = self.s.create_node_from_uri(uri)
+            n = self.s.create_node_from_uri(new_uri)
             return n.download_to_data()
         d.addCallback(_check)
         def _check2(data):
@@ -1545,17 +1545,17 @@ class Web(WebMixin, unittest.TestCase):
     def test_PUT_NEWFILE_URI_mutable(self):
         file_contents = "New file contents here\n"
         d = self.PUT("/uri?mutable=true", file_contents)
-        def _check(uri):
+        def _check_mutable(uri):
             uri = uri.strip()
             u = IURI(uri)
             self.failUnless(IMutableFileURI.providedBy(u))
             self.failUnless(u.storage_index in FakeMutableFileNode.all_contents)
             n = self.s.create_node_from_uri(uri)
             return n.download_to_data()
-        d.addCallback(_check)
-        def _check2(data):
+        d.addCallback(_check_mutable)
+        def _check2_mutable(data):
             self.failUnlessEqual(data, file_contents)
-        d.addCallback(_check2)
+        d.addCallback(_check2_mutable)
         return d
 
         def _check(uri):