aboutsummaryrefslogtreecommitdiff
path: root/tests/mammoth_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mammoth_tests.py')
-rw-r--r--tests/mammoth_tests.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/mammoth_tests.py b/tests/mammoth_tests.py
index 84cb6ea..9f37db0 100644
--- a/tests/mammoth_tests.py
+++ b/tests/mammoth_tests.py
@@ -138,6 +138,13 @@ def strikethrough_is_converted_to_s_element_by_default():
@istest
+def strikethrough_conversion_can_be_configured_with_style_mapping():
+ with open(test_path("strikethrough.docx"), "rb") as fileobj:
+ result = mammoth.convert_to_html(fileobj=fileobj, style_map="strike => del")
+ assert_equal("<p><del>Today's Special: Salmon</del> Sold out</p>", result.value)
+
+
+@istest
def transform_document_is_applied_to_document_before_conversion():
def transform_document(document):
document.children[0].style_id = "Heading1"