'Test for simple fills with a default solid pattern.'

def test_assemble_xml_file(self):

    self.maxDiff = None
    fh = StringIO()
    style = Styles()
    style._set_filehandle(fh)
    workbook = Workbook()
    workbook.add_format({'pattern': 1, 'bg_color': 'red', 'bold': 1})
    workbook.add_format({'bg_color': 'red', 'italic': 1})
    workbook.add_format({'fg_color': 'red', 'underline': 1})
    workbook._set_default_xf_indices()
    workbook._prepare_format_properties()
    style._set_style_properties([workbook.xf_formats, workbook.palette, workbook.font_count, workbook.num_format_count, workbook.border_count, workbook.fill_count, workbook.custom_colors, workbook.dxf_formats])
    style._assemble_xml_file()
    workbook.fileclosed = 1
    exp = _xml_to_list('\n                                                                <?xml    version="1.0"    encoding="UTF-8"    standalone="yes"?>\n                                                                <styleSheet    xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">\n                                                                        <fonts    count="4">\n                                                                                <font>\n                                                                                        <sz    val="11"/>\n                                                                                        <color    theme="1"/>\n                                                                                        <name    val="Calibri"/>\n                                                                                        <family    val="2"/>\n                                                                                        <scheme    val="minor"/>\n                                                                                </font>\n                                                                                <font>\n                                                                                        <b/>\n                                                                                        <sz    val="11"/>\n                                                                                        <color    theme="1"/>\n                                                                                        <name    val="Calibri"/>\n                                                                                        <family    val="2"/>\n                                                                                        <scheme    val="minor"/>\n                                                                                </font>\n                                                                                <font>\n                                                                                        <i/>\n                                                                                        <sz    val="11"/>\n                                                                                        <color    theme="1"/>\n                                                                                        <name    val="Calibri"/>\n                                                                                        <family    val="2"/>\n                                                                                        <scheme    val="minor"/>\n                                                                                </font>\n                                                                                <font>\n                                                                                        <u/>\n                                                                                        <sz    val="11"/>\n                                                                                        <color    theme="1"/>\n                                                                                        <name    val="Calibri"/>\n                                                                                        <family    val="2"/>\n                                                                                        <scheme    val="minor"/>\n                                                                                </font>\n                                                                        </fonts>\n                                                                        <fills    count="3">\n                                                                                <fill>\n                                                                                        <patternFill    patternType="none"/>\n                                                                                </fill>\n                                                                                <fill>\n                                                                                        <patternFill    patternType="gray125"/>\n                                                                                </fill>\n                                                                                <fill>\n                                                                                        <patternFill    patternType="solid">\n                                                                                                <fgColor    rgb="FFFF0000"/>\n                                                                                                <bgColor    indexed="64"/>\n                                                                                        </patternFill>\n                                                                                </fill>\n                                                                        </fills>\n                                                                        <borders    count="1">\n                                                                                <border>\n                                                                                        <left/>\n                                                                                        <right/>\n                                                                                        <top/>\n                                                                                        <bottom/>\n                                                                                        <diagonal/>\n                                                                                </border>\n                                                                        </borders>\n                                                                        <cellStyleXfs    count="1">\n                                                                                <xf    numFmtId="0"    fontId="0"    fillId="0"    borderId="0"/>\n                                                                        </cellStyleXfs>\n                                                                        <cellXfs    count="4">\n                                                                                <xf    numFmtId="0"    fontId="0"    fillId="0"    borderId="0"    xfId="0"/>\n                                                                                <xf    numFmtId="0"    fontId="1"    fillId="2"    borderId="0"    xfId="0"    applyFont="1"    applyFill="1"/>\n                                                                                <xf    numFmtId="0"    fontId="2"    fillId="2"    borderId="0"    xfId="0"    applyFont="1"    applyFill="1"/>\n                                                                                <xf    numFmtId="0"    fontId="3"    fillId="2"    borderId="0"    xfId="0"    applyFont="1"    applyFill="1"/>\n                                                                        </cellXfs>\n                                                                        <cellStyles    count="1">\n                                                                                <cellStyle    name="Normal"    xfId="0"    builtinId="0"/>\n                                                                        </cellStyles>\n                                                                        <dxfs    count="0"/>\n                                                                        <tableStyles    count="0"    defaultTableStyle="TableStyleMedium9"    defaultPivotStyle="PivotStyleLight16"/>\n                                                                </styleSheet>\n                                                                ')
    got = _xml_to_list(fh.getvalue())
    self.assertEqual(got, exp)
