# Path: draftjs_exporter/engines/lxml.py
# class DOM_LXML(DOMEngine):
#     """
#     lxml implementation of the DOM API.
#     """
# 
#     @staticmethod
#     def create_tag(type_: Tag, attr: Optional[Attr] = None) -> etree.Element:
#         nsmap = None
# 
#         if attr:
#             if "xlink:href" in attr:
#                 attr[f"{{{NSMAP['xlink']}}}href"] = attr.pop("xlink:href")
#                 nsmap = NSMAP
# 
#         return etree.Element(type_, attrib=attr, nsmap=nsmap)
# 
#     @staticmethod
#     def parse_html(markup: HTML) -> etree.Element:
#         return html.fromstring(markup)
# 
#     @staticmethod
#     def append_child(elt: etree.Element, child: etree.Element) -> None:
#         if hasattr(child, "tag"):
#             elt.append(child)
#         else:
#             c = etree.Element("fragment")
#             c.text = child
#             elt.append(c)
# 
#     @staticmethod
#     def render(elt: etree.Element) -> HTML:
#         return RENDER_RE.sub(
#             "", etree.tostring(elt, method="html", encoding="unicode")
#         )
# 
#     @staticmethod
#     def render_debug(elt: etree.Element) -> HTML:
#         return etree.tostring(elt, method="html", encoding="unicode")


import unittest
from draftjs_exporter.engines.lxml import DOM_LXML
# -*- coding: utf-8 -*-



class TestDOM_LXML(unittest.TestCase):
    def test_create_tag(self):
        self.assertEqual(

# Path: draftjs_exporter/engines/lxml.py
# class DOM_LXML(DOMEngine):
#     """
#     lxml implementation of the DOM API.
#     """
# 
#     @staticmethod
#     def create_tag(type_: Tag, attr: Optional[Attr] = None) -> etree.Element:
#         nsmap = None
# 
#         if attr:
#             if "xlink:href" in attr:
#                 attr[f"{{{NSMAP['xlink']}}}href"] = attr.pop("xlink:href")
#                 nsmap = NSMAP
# 
#         return etree.Element(type_, attrib=attr, nsmap=nsmap)
# 
#     @staticmethod
#     def parse_html(markup: HTML) -> etree.Element:
#         return html.fromstring(markup)
# 
#     @staticmethod
#     def append_child(elt: etree.Element, child: etree.Element) -> None:
#         if hasattr(child, "tag"):
#             elt.append(child)
#         else:
#             c = etree.Element("fragment")
#             c.text = child
#             elt.append(c)
# 
#     @staticmethod
#     def render(elt: etree.Element) -> HTML:
#         return RENDER_RE.sub(
#             "", etree.tostring(elt, method="html", encoding="unicode")
#         )
# 
#     @staticmethod
#     def render_debug(elt: etree.Element) -> HTML:
#         return etree.tostring(elt, method="html", encoding="unicode")


# Path: tests/engines/test_engines_lxml.py
import unittest
from draftjs_exporter.engines.lxml import DOM_LXML

# -*- coding: utf-8 -*-



class TestDOM_LXML(unittest.TestCase):
    def test_create_tag(self):
        self.assertEqual(

            DOM_LXML.render_debug(DOM_LXML.create_tag("p", {"class": "intro"})),