aboutsummaryrefslogtreecommitdiff
path: root/tests/conversion_tests.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2015-01-25 17:06:54 +0000
committerMichael Williamson <mike@zwobble.org>2015-01-25 17:06:54 +0000
commit1483a864719cedabc0d6c6bcd98e0b2d9d3ce0c1 (patch)
tree8f5db7dde7d0f1952890f5ba97af7c958c212d13 /tests/conversion_tests.py
parentabdcd67365d663c878fd370cb97e77ce74c2b1a7 (diff)
Use prefix to generate IDs
Diffstat (limited to 'tests/conversion_tests.py')
-rw-r--r--tests/conversion_tests.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/conversion_tests.py b/tests/conversion_tests.py
index 39c57cd..78fbce5 100644
--- a/tests/conversion_tests.py
+++ b/tests/conversion_tests.py
@@ -289,9 +289,9 @@ def footnote_reference_is_converted_to_superscript_intra_page_link():
footnote_reference = documents.note_reference("footnote", "4")
result = convert_document_element_to_html(
footnote_reference,
- generate_uniquifier=lambda: 42
+ id_prefix="doc-42"
)
- assert_equal('<sup><a href="#footnote-42-4" id="footnote-ref-42-4">[1]</a></sup>', result.value)
+ assert_equal('<sup><a href="#doc-42-footnote-4" id="doc-42-footnote-ref-4">[1]</a></sup>', result.value)
@istest
@@ -308,10 +308,10 @@ def footnotes_are_included_after_the_main_body():
)
result = convert_document_element_to_html(
document,
- generate_uniquifier=lambda: 42
+ id_prefix="doc-42"
)
- expected_html = ('<p>Knock knock<sup><a href="#footnote-42-4" id="footnote-ref-42-4">[1]</a></sup></p>' +
- '<ol><li id="footnote-42-4"><p>Who\'s there? <a href="#footnote-ref-42-4">↑</a></p></li></ol>')
+ expected_html = ('<p>Knock knock<sup><a href="#doc-42-footnote-4" id="doc-42-footnote-ref-4">[1]</a></sup></p>' +
+ '<ol><li id="doc-42-footnote-4"><p>Who\'s there? <a href="#doc-42-footnote-ref-4">↑</a></p></li></ol>')
assert_equal(expected_html, result.value)