def test_empty(self): from htmlpp.nodes import _Root ast = _Root("", {}, []) render = self._callFUT(ast) context = {} result = render(context) self.assertEqual(result.strip(), "")
def test_rawhtml(self): from htmlpp.nodes import _Root text = """ <!DOCTYPE html> <html> {% include "foo.bar.html" %} {% for line in body%} <p>{{line}}</p> {% endfor %} </html> """ ast = _Root(text, {}, [text]) render = self._callFUT(ast) context = {} result = render(context) self.assert_normalized(result, text)