#NEWLINE# def test_assemble_xml_file( self ) : #NEWLINE# #INDENT# 'Test writing a workbook with 2 worksheets.' #NEWLINE# self . maxDiff = None #NEWLINE# fh = StringIO ( ) #NEWLINE# workbook = Workbook ( ) #NEWLINE# workbook . _set_filehandle ( fh ) #NEWLINE# workbook . add_worksheet ( ) #NEWLINE# workbook . add_worksheet ( ) #NEWLINE# workbook . _assemble_xml_file ( ) #NEWLINE# workbook . fileclosed = 1 #NEWLINE# exp = _xml_to_list ( '\n                <?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n                <workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">\n                  <fileVersion appName="xl" lastEdited="4" lowestEdited="4" rupBuild="4505"/>\n                  <workbookPr defaultThemeVersion="124226"/>\n                  <bookViews>\n                    <workbookView xWindow="240" yWindow="15" windowWidth="16095" windowHeight="9660"/>\n                  </bookViews>\n                  <sheets>\n                    <sheet name="Sheet1" sheetId="1" r:id="rId1"/>\n                    <sheet name="Sheet2" sheetId="2" r:id="rId2"/>\n                  </sheets>\n                  <calcPr calcId="124519" fullCalcOnLoad="1"/>\n                </workbook>\n                ' ) #NEWLINE# got = _xml_to_list ( fh . getvalue ( ) ) #NEWLINE# self . assertEqual ( got , fh )