Test for failure caused by invalid path

A hyphen is expected when rendering /status page child nodes:
"/status/up" is wrong; "/status/up-0" is right.
This commit is contained in:
Sajith Sasidharan 2020-07-09 14:23:26 -04:00
parent 54248f334e
commit 2e160c1526

View File

@ -1034,6 +1034,11 @@ class Web(WebMixin, WebErrorMixin, testutil.StallMixin, testutil.ReallyEqualMixi
return d
def test_status_path_error(self):
# Expect an error, because path is expected to be of the form
# "/status/{up,down,..}-%number", with a hyphen.
return self.assertFailure(self.GET("/storage/nodash"), error.Error)
def test_status_numbers(self):
drrm = status.DownloadResultsRendererMixin()
self.failUnlessReallyEqual(drrm.render_time(None, None), "")