test: exhibit error situation when appending a node to an un-escaped node
1 files changed, 4 insertions(+), 0 deletions(-)

M tests/test_html.py
M tests/test_html.py +4 -0
@@ 87,6 87,10 @@ class TestCase(unittest.TestCase):
         h.text('<>&', False)
         self.assertEquals(str(h), '<>&')
 
+        with h.p('hello', escape=False) as p:
+            with self.assertRaises(AttributeError):
+                p.a('world', href='http://perdu.com')
+
     def test_escape_attr(self):
         'escaping of special HTML characters in attributes'
         h = HTML()