Rename a class for consistency's sake

This commit is contained in:
Sajith Sasidharan 2020-06-17 21:32:49 -04:00
parent c8d218fb9f
commit 47f9147e16
2 changed files with 4 additions and 4 deletions

View File

@ -83,7 +83,7 @@ class WebResultsRendering(unittest.TestCase):
return unittest.TestCase().successResultOf(d) return unittest.TestCase().successResultOf(d)
def test_literal(self): def test_literal(self):
lcr = web_check_results.LiteralCheckResultsElement() lcr = web_check_results.LiteralCheckResultsRendererElement()
html = self.render_element(lcr) html = self.render_element(lcr)
s = self.remove_tags(html) s = self.remove_tags(html)

View File

@ -221,7 +221,7 @@ class LiteralCheckResultsRenderer(MultiFormatResource, ResultsBase):
self._client = client self._client = client
def render_HTML(self, req): def render_HTML(self, req):
return renderElement(req, LiteralCheckResultsElement()) return renderElement(req, LiteralCheckResultsRendererElement())
def render_JSON(self, req): def render_JSON(self, req):
req.setHeader("content-type", "text/plain") req.setHeader("content-type", "text/plain")
@ -229,12 +229,12 @@ class LiteralCheckResultsRenderer(MultiFormatResource, ResultsBase):
return json.dumps(data, indent=1) + "\n" return json.dumps(data, indent=1) + "\n"
class LiteralCheckResultsElement(Element): class LiteralCheckResultsRendererElement(Element):
loader = XMLFile(FilePath(__file__).sibling("literal-check-results.xhtml")) loader = XMLFile(FilePath(__file__).sibling("literal-check-results.xhtml"))
def __init__(self): def __init__(self):
super(LiteralCheckResultsElement, self).__init__() super(LiteralCheckResultsRendererElement, self).__init__()
@renderer @renderer
def return_to(self, req, tag): def return_to(self, req, tag):