eynollah/tests/test_xml.py
2021-02-27 17:38:55 +01:00

11 lines
360 B
Python

from lxml import etree as ET
from qurator.eynollah.utils.xml import create_page_xml, NAMESPACES
def tostring(el):
return ET.tostring(el).decode('utf-8')
def test_create_xml():
pcgts, page = create_page_xml('/path/to/img.tif', 100, 100)
xmlstr = tostring(pcgts)
assert 'xmlns="%s"' % NAMESPACES[None] in xmlstr
assert 'Metadata' in xmlstr