mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-19 00:06:57 +00:00
Rename nested functions for clarity
... and also to remove embarrassing copy-pasta mistakes.
This commit is contained in:
parent
b48556c2cb
commit
abd539588f
@ -1050,7 +1050,7 @@ class Web(WebMixin, WebErrorMixin, testutil.StallMixin, testutil.ReallyEqualMixi
|
||||
h = self.s.get_history()
|
||||
ul_num = h.list_all_upload_statuses()[0].get_counter()
|
||||
d = self.GET("/status/up-{}".format(ul_num), return_response=True)
|
||||
def _upload_status(result):
|
||||
def _upload_status_check(result):
|
||||
body, status, _ = result
|
||||
self.failUnlessReallyEqual(int(status), 200)
|
||||
soup = BeautifulSoup(body, 'html5lib')
|
||||
@ -1059,7 +1059,7 @@ class Web(WebMixin, WebErrorMixin, testutil.StallMixin, testutil.ReallyEqualMixi
|
||||
self, soup, u"title",
|
||||
u"Tahoe-LAFS - File Upload Status"
|
||||
)
|
||||
d.addCallback(_upload_status)
|
||||
d.addCallback(_upload_status_check)
|
||||
return d
|
||||
|
||||
def test_status_down_subpath(self):
|
||||
@ -1067,7 +1067,7 @@ class Web(WebMixin, WebErrorMixin, testutil.StallMixin, testutil.ReallyEqualMixi
|
||||
h = self.s.get_history()
|
||||
dl_num = h.list_all_download_statuses()[0].get_counter()
|
||||
d = self.GET("/status/down-{}".format(dl_num), return_response=True)
|
||||
def _download_status(result):
|
||||
def _download_status_check(result):
|
||||
body, status, _ = result
|
||||
self.failUnlessReallyEqual(int(status), 200)
|
||||
soup = BeautifulSoup(body, 'html5lib')
|
||||
@ -1076,7 +1076,7 @@ class Web(WebMixin, WebErrorMixin, testutil.StallMixin, testutil.ReallyEqualMixi
|
||||
self, soup, u"title",
|
||||
u"Tahoe-LAFS - File Download Status"
|
||||
)
|
||||
d.addCallback(_download_status)
|
||||
d.addCallback(_download_status_check)
|
||||
return d
|
||||
|
||||
def test_status_mapupdate_subpath(self):
|
||||
@ -1084,7 +1084,7 @@ class Web(WebMixin, WebErrorMixin, testutil.StallMixin, testutil.ReallyEqualMixi
|
||||
h = self.s.get_history()
|
||||
mu_num = h.list_all_mapupdate_statuses()[0].get_counter()
|
||||
d = self.GET("/status/mapupdate-{}".format(mu_num), return_response=True)
|
||||
def _mapupdate_status(result):
|
||||
def _mapupdate_status_check(result):
|
||||
body, status, _ = result
|
||||
self.failUnlessReallyEqual(int(status), 200)
|
||||
soup = BeautifulSoup(body, 'html5lib')
|
||||
@ -1093,7 +1093,7 @@ class Web(WebMixin, WebErrorMixin, testutil.StallMixin, testutil.ReallyEqualMixi
|
||||
self, soup, u"title",
|
||||
u"Tahoe-LAFS - Mutable File Servermap Update Status"
|
||||
)
|
||||
d.addCallback(_mapupdate_status)
|
||||
d.addCallback(_mapupdate_status_check)
|
||||
return d
|
||||
|
||||
def test_status_publish_subpath(self):
|
||||
@ -1101,7 +1101,7 @@ class Web(WebMixin, WebErrorMixin, testutil.StallMixin, testutil.ReallyEqualMixi
|
||||
h = self.s.get_history()
|
||||
pub_num = h.list_all_publish_statuses()[0].get_counter()
|
||||
d = self.GET("/status/publish-{}".format(pub_num), return_response=True)
|
||||
def _mapupdate_status(result):
|
||||
def _publish_status_check(result):
|
||||
body, status, _ = result
|
||||
self.failUnlessReallyEqual(int(status), 200)
|
||||
soup = BeautifulSoup(body, 'html5lib')
|
||||
@ -1110,7 +1110,7 @@ class Web(WebMixin, WebErrorMixin, testutil.StallMixin, testutil.ReallyEqualMixi
|
||||
self, soup, u"title",
|
||||
u"Tahoe-LAFS - Mutable File Publish Status"
|
||||
)
|
||||
d.addCallback(_mapupdate_status)
|
||||
d.addCallback(_publish_status_check)
|
||||
return d
|
||||
|
||||
def test_status_retrieve_subpath(self):
|
||||
@ -1118,7 +1118,7 @@ class Web(WebMixin, WebErrorMixin, testutil.StallMixin, testutil.ReallyEqualMixi
|
||||
h = self.s.get_history()
|
||||
ret_num = h.list_all_retrieve_statuses()[0].get_counter()
|
||||
d = self.GET("/status/retrieve-{}".format(ret_num), return_response=True)
|
||||
def _mapupdate_status(result):
|
||||
def _retrieve_status_check(result):
|
||||
body, status, _ = result
|
||||
self.failUnlessReallyEqual(int(status), 200)
|
||||
soup = BeautifulSoup(body, 'html5lib')
|
||||
@ -1127,7 +1127,7 @@ class Web(WebMixin, WebErrorMixin, testutil.StallMixin, testutil.ReallyEqualMixi
|
||||
self, soup, u"title",
|
||||
u"Tahoe-LAFS - Mutable File Retrieve Status"
|
||||
)
|
||||
d.addCallback(_mapupdate_status)
|
||||
d.addCallback(_retrieve_status_check)
|
||||
return d
|
||||
|
||||
def test_status_numbers(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user