def test_toctree_man(self):
     style = ReSTStyle(ReSTDocument())
     style.doc.target = 'man'
     style.toctree()
     style.tocitem('foo')
     style.tocitem('bar')
     self.assertEqual(style.doc.getvalue(),
                      six.b('\n\n\n* foo\n\n\n* bar\n\n'))
 def test_toctree_html(self):
     style = ReSTStyle(ReSTDocument())
     style.doc.target = 'html'
     style.toctree()
     style.tocitem('foo')
     style.tocitem('bar')
     self.assertEqual(
         style.doc.getvalue(),
         six.b('\n.. toctree::\n  :maxdepth: 1'
               '\n  :titlesonly:\n\n  foo\n  bar\n'))