'Verifies that the [TOC] wiki code renders a Table of Content'

def test_toc_renders_table_of_content(self):

    md = markdown.Markdown(extensions=[u'extra', WikiTocExtension()])
    text = u'[TOC]\n\n#    First    title.\n\nParagraph    1\n\n##    Subsection\n\nParagraph    2'
    expected_output = u'<div    class="toc">\n<ul>\n<li><a    href="#wiki-toc-first-title">First    title.</a><ul>\n<li><a    href="#wiki-toc-subsection">Subsection</a></li>\n</ul>\n</li>\n</ul>\n</div>\n<h1    id="wiki-toc-first-title">First    title.</h1>\n<p>Paragraph    1</p>\n<h2    id="wiki-toc-subsection">Subsection</h2>\n<p>Paragraph    2</p>'
    self.assertEqual(md.convert(text), expected_output)
