#NEWLINE# def test_assemble_xml_file( self ) : #NEWLINE# #INDENT# 'Test the _assemble_xml_file() method' #NEWLINE# string_table = SharedStringTable ( ) #NEWLINE# index = string_table . _get_shared_string_index ( 'abcdefg' ) #NEWLINE# self . assertEqual ( index , 0 ) #NEWLINE# index = string_table . _get_shared_string_index ( '   abcdefg' ) #NEWLINE# self . assertEqual ( index , 1 ) #NEWLINE# index = string_table . _get_shared_string_index ( 'abcdefg   ' ) #NEWLINE# self . assertEqual ( index , 2 ) #NEWLINE# string_table . _sort_string_data ( ) #NEWLINE# fh = StringIO ( ) #NEWLINE# sharedstrings = SharedStrings ( ) #NEWLINE# sharedstrings . _set_filehandle ( fh ) #NEWLINE# sharedstrings . string_table = string_table #NEWLINE# sharedstrings . _assemble_xml_file ( ) #NEWLINE# exp = _xml_to_list ( '\n                <?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n                <sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" count="3" uniqueCount="3">\n                  <si>\n                    <t>abcdefg</t>\n                  </si>\n                  <si>\n                    <t xml:space="preserve">   abcdefg</t>\n                  </si>\n                  <si>\n                    <t xml:space="preserve">abcdefg   </t>\n                  </si>\n                </sst>\n                ' ) #NEWLINE# got = _xml_to_list ( fh . getvalue ( ) ) #NEWLINE# self . assertEqual ( got , exp )