'Test the _write_header_footer() method header and footer'

def test_write_header_footer_both(self):

    self.worksheet.set_header('Page    &P    of    &N')
    self.worksheet.set_footer('&F')
    self.worksheet._write_header_footer()
    exp = '<headerFooter><oddHeader>Page    &amp;P    of    &amp;N</oddHeader><oddFooter>&amp;F</oddFooter></headerFooter>'
    got = self.fh.getvalue()
    self.assertEqual(got, exp)
