def test_append_to(self): doc = mock_document() root = XmlNode(doc, 'html') child = XmlNode(doc, 'body') child.append_to(root) test.assert_equal(root.child_nodes, [child])