def test_h2(self): style = ReSTStyle(ReSTDocument()) style.h2('foobar fiebaz') self.assertEqual( style.doc.getvalue(), six.b('\n\n=============\nfoobar fiebaz\n=============\n\n'))