diff --git a/py3o/template/tests/test_templates.py b/py3o/template/tests/test_templates.py index 91dbb7b..91e70e6 100644 --- a/py3o/template/tests/test_templates.py +++ b/py3o/template/tests/test_templates.py @@ -684,7 +684,7 @@ def test_image_injection(self): i = 0 nmspc = template.namespaces - table = content_list.find("//table:table", nmspc) + table = content_list.find(".//table:table", nmspc) frame_path = "table:table-cell/text:p/draw:frame" images_hrefs = set() for row in table.findall("table:table-row", nmspc): @@ -707,7 +707,7 @@ def test_image_injection(self): # check if images are into the manifest manifest_el = lxml.etree.parse(BytesIO(outodt.read(MANIFEST))) - file_entries = manifest_el.findall("//manifest:file-entry", nmspc) + file_entries = manifest_el.findall(".//manifest:file-entry", nmspc) for entry in file_entries: path = entry.get("{{{}}}full-path".format(nmspc["manifest"])) if path in images_hrefs: @@ -971,7 +971,7 @@ def test_remove_soft_page_breaks(self): ) nmspc = template.namespaces - paragraphs = content_list.findall("//text:p", nmspc) + paragraphs = content_list.findall(".//text:p", nmspc) bottom_break_paragraphs, middle_break_paragraphs = 0, 0 for p in paragraphs: if not p.text: