mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-07 20:00:20 +00:00
Use docstrings
This commit is contained in:
parent
8db60e3486
commit
66dd2d3658
@ -1074,6 +1074,10 @@ class Web(WebMixin, WebErrorMixin, testutil.StallMixin, testutil.ReallyEqualMixi
|
|||||||
return d
|
return d
|
||||||
|
|
||||||
def _check_status_subpath_result(self, result, expected_title):
|
def _check_status_subpath_result(self, result, expected_title):
|
||||||
|
"""
|
||||||
|
Helper to verify that results of "GET /status/up-0" and
|
||||||
|
similar are as expected.
|
||||||
|
"""
|
||||||
body, status, _ = result
|
body, status, _ = result
|
||||||
self.failUnlessReallyEqual(int(status), 200)
|
self.failUnlessReallyEqual(int(status), 200)
|
||||||
soup = BeautifulSoup(body, 'html5lib')
|
soup = BeautifulSoup(body, 'html5lib')
|
||||||
@ -1083,35 +1087,45 @@ class Web(WebMixin, WebErrorMixin, testutil.StallMixin, testutil.ReallyEqualMixi
|
|||||||
)
|
)
|
||||||
|
|
||||||
def test_status_up_subpath(self):
|
def test_status_up_subpath(self):
|
||||||
# See that "GET /status/up-0" works.
|
"""
|
||||||
|
See that "GET /status/up-0" works.
|
||||||
|
"""
|
||||||
d = self.GET("/status/up-0", return_response=True)
|
d = self.GET("/status/up-0", return_response=True)
|
||||||
d.addCallback(self._check_status_subpath_result,
|
d.addCallback(self._check_status_subpath_result,
|
||||||
u"Tahoe-LAFS - File Upload Status")
|
u"Tahoe-LAFS - File Upload Status")
|
||||||
return d
|
return d
|
||||||
|
|
||||||
def test_status_down_subpath(self):
|
def test_status_down_subpath(self):
|
||||||
# See that "GET /status/down-0" works.
|
"""
|
||||||
|
See that "GET /status/down-0" works.
|
||||||
|
"""
|
||||||
d = self.GET("/status/down-0", return_response=True)
|
d = self.GET("/status/down-0", return_response=True)
|
||||||
d.addCallback(self._check_status_subpath_result,
|
d.addCallback(self._check_status_subpath_result,
|
||||||
u"Tahoe-LAFS - File Download Status")
|
u"Tahoe-LAFS - File Download Status")
|
||||||
return d
|
return d
|
||||||
|
|
||||||
def test_status_mapupdate_subpath(self):
|
def test_status_mapupdate_subpath(self):
|
||||||
# See that "GET /status/mapupdate-0" works.
|
"""
|
||||||
|
See that "GET /status/mapupdate-0" works.
|
||||||
|
"""
|
||||||
d = self.GET("/status/mapupdate-0", return_response=True)
|
d = self.GET("/status/mapupdate-0", return_response=True)
|
||||||
d.addCallback(self._check_status_subpath_result,
|
d.addCallback(self._check_status_subpath_result,
|
||||||
u"Tahoe-LAFS - Mutable File Servermap Update Status")
|
u"Tahoe-LAFS - Mutable File Servermap Update Status")
|
||||||
return d
|
return d
|
||||||
|
|
||||||
def test_status_publish_subpath(self):
|
def test_status_publish_subpath(self):
|
||||||
# See that "GET /status/publish-0" works.
|
"""
|
||||||
|
See that "GET /status/publish-0" works.
|
||||||
|
"""
|
||||||
d = self.GET("/status/publish-0", return_response=True)
|
d = self.GET("/status/publish-0", return_response=True)
|
||||||
d.addCallback(self._check_status_subpath_result,
|
d.addCallback(self._check_status_subpath_result,
|
||||||
u"Tahoe-LAFS - Mutable File Publish Status")
|
u"Tahoe-LAFS - Mutable File Publish Status")
|
||||||
return d
|
return d
|
||||||
|
|
||||||
def test_status_retrieve_subpath(self):
|
def test_status_retrieve_subpath(self):
|
||||||
# See that "GET /status/retrieve-0" works.
|
"""
|
||||||
|
See that "GET /status/retrieve-0" works.
|
||||||
|
"""
|
||||||
d = self.GET("/status/retrieve-0", return_response=True)
|
d = self.GET("/status/retrieve-0", return_response=True)
|
||||||
d.addCallback(self._check_status_subpath_result,
|
d.addCallback(self._check_status_subpath_result,
|
||||||
u"Tahoe-LAFS - Mutable File Retrieve Status")
|
u"Tahoe-LAFS - Mutable File Retrieve Status")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user