diff --git a/src/allmydata/test/web/test_root.py b/src/allmydata/test/web/test_root.py index b1447b4ac..c9ded6906 100644 --- a/src/allmydata/test/web/test_root.py +++ b/src/allmydata/test/web/test_root.py @@ -5,6 +5,7 @@ from mock import Mock from twisted.trial import unittest from twisted.internet.task import Clock from twisted.internet.defer import inlineCallbacks +from twisted.web.template import XMLString, Element from nevow.testutil import FakeRequest, FakeSession, renderPage from nevow.context import WebContext @@ -134,14 +135,15 @@ class RenderRoot(unittest.TestCase): self.clock = Clock() self.client = FakeClient() - def _test_root_template(self): - page = Root(self.client, self.clock, now_fn=self.clock.seconds) - page.addSlash = False + def test_basic_stan(self): + + class MyRoot(Element): + loader = XMLString(GOLDEN_ROOT) + request = FakeRequest() - print(dir(page)) - print(page.renderer) - d = page.renderHTTP(request) - print(d) + r = MyRoot() + data = r.render(request) + print(data) @inlineCallbacks def test_root_template(self): @@ -154,8 +156,9 @@ class RenderRoot(unittest.TestCase): # we chop up to the line with "