mirror of
https://github.com/qurator-spk/eynollah.git
synced 2025-07-11 03:49:53 +02:00
11 lines
368 B
Python
11 lines
368 B
Python
from lxml import etree as ET
|
|
from sbb_newspapers_org_image.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
|