aboutsummaryrefslogtreecommitdiff
path: root/tests/cli_tests.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2013-12-17 20:01:32 +0000
committerMichael Williamson <mike@zwobble.org>2013-12-17 20:01:32 +0000
commita2d5ef8d5590bfb7d7b038d7753b8d8b2b013ecd (patch)
tree0f4056f332a2a0ce50c032367f630cd2e134de3a /tests/cli_tests.py
parent50cddcce1e3a0e14efaf66c22f63a273edd95ba4 (diff)
Test image output from CLI
Diffstat (limited to 'tests/cli_tests.py')
-rw-r--r--tests/cli_tests.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/cli_tests.py b/tests/cli_tests.py
index a54349b..c274ce2 100644
--- a/tests/cli_tests.py
+++ b/tests/cli_tests.py
@@ -27,4 +27,11 @@ def html_is_written_to_file_if_output_file_is_set():
assert_equal(b"", result.output)
with open(output_path) as output_file:
assert_equal("<p>Walking on imported air</p>", output_file.read())
+
+
+@istest
+def inline_images_are_included_in_output_if_writing_to_single_file():
+ docx_path = test_path("tiny-picture.docx")
+ result = _local.run(["mammoth", docx_path])
+ assert_equal(b"""<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAIAAAACUFjqAAAAAXNSR0IArs4c6QAAAAlwSFlzAAAOvgAADr4B6kKxwAAAABNJREFUKFNj/M+ADzDhlWUYqdIAQSwBE8U+X40AAAAASUVORK5CYII=" /></p>""", result.output)