aboutsummaryrefslogtreecommitdiff
path: root/tests/docx/notes_xml_tests.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2018-01-23 22:06:12 +0000
committerMichael Williamson <mike@zwobble.org>2018-01-23 22:06:12 +0000
commit0eeab964d0373ecdbdd14b5c96b0ab6faaa18cad (patch)
treeeb4adcb3e06509d0b4613bd0592bfd3030cfd680 /tests/docx/notes_xml_tests.py
parent93e07b02624f668aa9300c048cde05bb416dda35 (diff)
Generate relationships path from part path
Diffstat (limited to 'tests/docx/notes_xml_tests.py')
-rw-r--r--tests/docx/notes_xml_tests.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/docx/notes_xml_tests.py b/tests/docx/notes_xml_tests.py
index b912991..56a7681 100644
--- a/tests/docx/notes_xml_tests.py
+++ b/tests/docx/notes_xml_tests.py
@@ -2,16 +2,16 @@ from nose.tools import istest, assert_equal
from mammoth import documents
from mammoth.docx.xmlparser import element as xml_element
-from mammoth.docx.notes_xml import create_footnotes_reader
+from mammoth.docx.notes_xml import read_footnotes_xml_element
from mammoth.docx import body_xml
@istest
def id_and_body_of_footnote_are_read():
footnote_body = [xml_element("w:p")]
- footnotes = create_footnotes_reader(body_xml.reader())(xml_element("w:footnotes", {}, [
+ footnotes = read_footnotes_xml_element(xml_element("w:footnotes", {}, [
xml_element("w:footnote", {"w:id": "1"}, footnote_body),
- ]))
+ ]), body_reader=body_xml.reader())
assert_equal(1, len(footnotes.value))
assert isinstance(footnotes.value[0].body[0], documents.Paragraph)
assert_equal("1", footnotes.value[0].note_id)
@@ -29,8 +29,8 @@ def separator_is_ignored():
def _assert_footnote_type_is_ignored(footnote_type):
footnote_body = [xml_element("w:p")]
- footnotes = create_footnotes_reader(None)(xml_element("w:footnotes", {}, [
+ footnotes = read_footnotes_xml_element(xml_element("w:footnotes", {}, [
xml_element("w:footnote", {"w:id": "1", "w:type": footnote_type}, footnote_body),
- ]))
+ ]), body_reader=None)
assert_equal(0, len(footnotes.value))