Use the more feaetureful rendering helper

This commit is contained in:
Jean-Paul Calderone 2020-10-16 09:43:24 -04:00
parent 31207e4b6b
commit a1f1f00be7

View File

@ -32,6 +32,9 @@ from allmydata.mutable.publish import MutableData
from .common import (
EMPTY_CLIENT_CONFIG,
)
from .common_web import (
render,
)
from .web.common import (
assert_soup_has_favicon,
@ -164,11 +167,11 @@ class WebResultsRendering(unittest.TestCase):
return c
def render_json(self, resource):
return resource.render(TestRequest(args={"output": ["json"]}))
return self.successResultOf(render(resource, {"output": ["json"]}))
def render_element(self, element, args=None):
d = flattenString(TestRequest(args), element)
return unittest.TestCase().successResultOf(d)
return self.successResultOf(d)
def test_literal(self):
lcr = web_check_results.LiteralCheckResultsRendererElement()