From: Brian Warner Date: Wed, 6 Feb 2008 05:37:51 +0000 (-0700) Subject: test_web.py: hush pyflakes X-Git-Tag: allmydata-tahoe-0.8.0~135 X-Git-Url: https://git.rkrishnan.org/%5B/%5D%20/uri/frontends/something?a=commitdiff_plain;h=27f46f2aaf5479b08737529adc8e72a45c619d64;p=tahoe-lafs%2Ftahoe-lafs.git test_web.py: hush pyflakes --- diff --git a/src/allmydata/test/test_web.py b/src/allmydata/test/test_web.py index af4cb7b3..5acb9ec9 100644 --- a/src/allmydata/test/test_web.py +++ b/src/allmydata/test/test_web.py @@ -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):