aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/conversion_tests.py10
-rw-r--r--tests/docx/document_xml_tests.py4
2 files changed, 7 insertions, 7 deletions
diff --git a/tests/conversion_tests.py b/tests/conversion_tests.py
index 246671d..39c57cd 100644
--- a/tests/conversion_tests.py
+++ b/tests/conversion_tests.py
@@ -286,7 +286,7 @@ def can_define_custom_conversion_for_images():
@istest
def footnote_reference_is_converted_to_superscript_intra_page_link():
- footnote_reference = documents.footnote_reference("4")
+ footnote_reference = documents.note_reference("footnote", "4")
result = convert_document_element_to_html(
footnote_reference,
generate_uniquifier=lambda: 42
@@ -296,15 +296,15 @@ def footnote_reference_is_converted_to_superscript_intra_page_link():
@istest
def footnotes_are_included_after_the_main_body():
- footnote_reference = documents.footnote_reference("4")
+ footnote_reference = documents.note_reference("footnote", "4")
document = documents.document(
[documents.paragraph([
_run_with_text("Knock knock"),
documents.run([footnote_reference])
])],
- footnotes=documents.Footnotes({
- "4": documents.Footnote("4", [_paragraph_with_text("Who's there?")])
- })
+ notes=documents.notes([
+ documents.note("footnote", "4", [_paragraph_with_text("Who's there?")])
+ ])
)
result = convert_document_element_to_html(
document,
diff --git a/tests/docx/document_xml_tests.py b/tests/docx/document_xml_tests.py
index 8e2cb8d..a0d29b9 100644
--- a/tests/docx/document_xml_tests.py
+++ b/tests/docx/document_xml_tests.py
@@ -321,7 +321,7 @@ class ReadXmlElementTests(object):
document_xml = xml_element("w:document", {}, [body_xml])
document = _read_and_get_document_xml_element(document_xml, footnote_elements=footnotes)
- footnote = document.footnotes.find_footnote_by_id("4")
+ footnote = document.notes.find_note("footnote", "4")
assert_equal("4", footnote.id)
assert isinstance(footnote.body[0], documents.Paragraph)
@@ -329,7 +329,7 @@ class ReadXmlElementTests(object):
def footnote_reference_has_id_read(self):
footnote_xml = xml_element("w:footnoteReference", {"w:id": "4"})
footnote = _read_and_get_document_xml_element(footnote_xml)
- assert_equal("4", footnote.footnote_id)
+ assert_equal("4", footnote.note_id)
@istest
def ignored_elements_are_ignored_without_message(self):