Use a better assert in status subpath test

This commit is contained in:
Sajith Sasidharan 2020-07-11 08:30:39 -04:00
parent d4a02aa1cd
commit 144001f380

View File

@ -1038,7 +1038,13 @@ class Web(WebMixin, WebErrorMixin, testutil.StallMixin, testutil.ReallyEqualMixi
def test_status_path_error(self): def test_status_path_error(self):
# Expect an error, because path is expected to be of the form # Expect an error, because path is expected to be of the form
# "/status/{up,down,..}-%number", with a hyphen. # "/status/{up,down,..}-%number", with a hyphen.
return self.assertFailure(self.GET("/storage/nodash"), error.Error) d = self.shouldFail2(error.Error,
"test_status_path_error",
"400 Bad Request",
"no '-' in 'nodash'",
self.GET,
"/status/nodash")
return d
def test_status_numbers(self): def test_status_numbers(self):
drrm = status.DownloadResultsRendererMixin() drrm = status.DownloadResultsRendererMixin()