pass file-like object to Docx.render method
This commit is contained in:
@@ -6,7 +6,8 @@ from atst.utils.docx import Docx
|
||||
|
||||
def test_render_docx():
|
||||
data = {"droid_class": "R2"}
|
||||
docx_file = Docx.render(data=data)
|
||||
byte_str = BytesIO()
|
||||
docx_file = Docx.render(byte_str, data=data)
|
||||
zip_ = ZipFile(docx_file, mode="r")
|
||||
document = zip_.read(Docx.DOCUMENT_FILE)
|
||||
assert b"droid_class: R2" in document
|
||||
|
Reference in New Issue
Block a user