def test_docx_to_html(self):
"""DOCX to HTML"""
self.set_original_document_from_file('demo.docx')
response = self.app.post('/convert/',
buffered=True,
content_type='multipart/form-data',
data={
'document': (self.original_document, self.original_document_name),
'from': 'docx',
'to': 'html'
})
destination_document = response.data
assert '200' in response.status
assert 'text/html' in response.content_type
assert magic.from_buffer(destination_document, mime=True) == 'text/html'
assert os.listdir(app.config['CONVERSION_FOLDER']) == []
评论列表
文章目录