aboutsummaryrefslogtreecommitdiff
path: root/tests/mammoth_tests.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2015-07-20 18:57:46 +0100
committerMichael Williamson <mike@zwobble.org>2015-07-20 18:58:15 +0100
commit61cf58387f239633bf1b81f4e8252459152d2598 (patch)
tree99aaf0469c35a330a973618dc5f7cb176cb14e18 /tests/mammoth_tests.py
parent3d20b52a4105d48e319493adf2481cdb5985f72d (diff)
Support linked images
Diffstat (limited to 'tests/mammoth_tests.py')
-rw-r--r--tests/mammoth_tests.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/mammoth_tests.py b/tests/mammoth_tests.py
index 2c7262c..88aa445 100644
--- a/tests/mammoth_tests.py
+++ b/tests/mammoth_tests.py
@@ -47,6 +47,14 @@ def inline_images_are_included_in_output():
result = mammoth.convert_to_html(fileobj=fileobj)
assert_equal("""<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAIAAAACUFjqAAAAAXNSR0IArs4c6QAAAAlwSFlzAAAOvgAADr4B6kKxwAAAABNJREFUKFNj/M+ADzDhlWUYqdIAQSwBE8U+X40AAAAASUVORK5CYII=" /></p>""", result.value)
assert_equal([], result.messages)
+
+
+@istest
+def images_stored_outside_of_document_are_included_in_output():
+ with open(test_path("external-picture.docx"), "rb") as fileobj:
+ result = mammoth.convert_to_html(fileobj=fileobj)
+ assert_equal("""<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAIAAAACUFjqAAAAAXNSR0IArs4c6QAAAAlwSFlzAAAOvgAADr4B6kKxwAAAABNJREFUKFNj/M+ADzDhlWUYqdIAQSwBE8U+X40AAAAASUVORK5CYII=" /></p>""", result.value)
+ assert_equal([], result.messages)
@istest