def test_toc(self): """Verify the table of contents is generated with an ID for the heading""" expected = '''### Table of Contents * [1.2.3 REQ001](#REQ001) * [1.4 REQ003](#REQ003) * [1.6 REQ004](#REQ004) * [2.1 REQ002](#REQ002) * [2.1 REQ2-001](#REQ2-001)\n''' toc = publisher._table_of_contents_md(self.document, linkify=True) self.assertEqual(expected, toc)
def test_toc(self): """Verify the table of contents is generated with an ID for the heading""" expected = '''### Table of Contents * [1.2.3 REQ001](#REQ001) * [1.4 REQ003](#REQ003) * [1.6 REQ004](#REQ004) * [2.1 REQ002](#REQ002) * [2.1 REQ2-001](#REQ2-001)\n''' toc = publisher._table_of_contents_md(self.document, linkify=True) self.assertEqual(expected, toc)
def test_toc_no_links(self): """Verify the table of contents is generated without heading levels""" expected = '''### Table of Contents * REQ001 * REQ003 * REQ004 * REQ002 * REQ2-001\n''' toc = publisher._table_of_contents_md(self.document, linkify=None) print(toc) self.assertEqual(expected, toc)
def test_toc_no_links(self): """Verify the table of contents is generated without heading levels""" expected = '''### Table of Contents * REQ001 * REQ003 * REQ004 * REQ002 * REQ2-001\n''' toc = publisher._table_of_contents_md(self.document, linkify=None) print(toc) self.assertEqual(expected, toc)
def test_toc_no_links_or_heading_levels(self): """Verify the table of contents is generated with heading levels""" expected = '''### Table of Contents * 1.2.3 REQ001 * 1.4 REQ003 * 1.6 REQ004 * 2.1 Plantuml * 2.1 REQ2-001\n''' toc = publisher._table_of_contents_md(self.document, linkify=None) print(toc) self.assertEqual(expected, toc)