def testIntegrationGen(self): input = HoroInput() input.load('sample.xlsx') report = HoroReport() report.loadDataSource('AstroReport_Content.xlsx') content = report.loadContentUsing(input.getReport('Sheet1')) doc = HoroDocument() doc.generate(content) doc.save('sample.docx')
def testsSanity(self): doc = HoroDocument() content = [] content.append({ 'section_title': u'Bạch Dương title', 'paragraph': [ { 'title': u'Bạch Dương paragraph 1', 'content': u'Bạch Dương content 1' }, { 'title': u'Bạch Dương paragraph 2', 'content': u'Bạch Dương content 2' } ]}) doc.generate(content) doc.save('test.docx')