aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-06-20 19:31:10 +0100
committerMichael Williamson <mike@zwobble.org>2016-06-20 19:31:10 +0100
commit89eea467a17982b658c6a943bed31dcbd81ea660 (patch)
tree753b647a6b68b53afaf46cec6dda3624790f189d /tests
parent35e9397194977a2e55de6f1d6119140070416822 (diff)
Add support for w:sdt elements
Diffstat (limited to 'tests')
-rw-r--r--tests/docx/body_xml_tests.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/docx/body_xml_tests.py b/tests/docx/body_xml_tests.py
index 2773398..e35110f 100644
--- a/tests/docx/body_xml_tests.py
+++ b/tests/docx/body_xml_tests.py
@@ -634,6 +634,16 @@ class ReadXmlElementTests(object):
assert_equal("second", result.style_id)
@istest
+ def sdt_is_read_using_sdt_content(self):
+ element = xml_element("w:sdt", {}, [
+ xml_element("w:sdtContent", {}, [
+ xml_element("w:t", {}, [xml_text("Blackdown")]),
+ ]),
+ ])
+ result = _read_and_get_document_xml_element(element)
+ assert_equal(documents.text("Blackdown"), result)
+
+ @istest
def text_nodes_are_ignored_when_reading_children(self):
element = xml_element("w:r", {}, [xml_text("[text]")])
assert_equal(