def test_heading_not_startig_from_h1_should_mention_reason(self):
     html = '''
         <h2>two</h2>
         <h3>three</h3>
     '''
     reason = TocGenerator(html).is_invalid()
     self.assertIn('<h2>two</h2>', reason.lower())
Esempio n. 2
0
 def test_heading_not_startig_from_h1_should_mention_reason(self):
     html = '''
         <h2>two</h2>
         <h3>three</h3>
     '''
     reason = TocGenerator(html).is_invalid()
     self.assertIn('<h2>two</h2>', reason.lower())
 def test_invalid_level_of_headings_should_mention_reason(self):
     html = '''
         <h1>one</h1>
         <h1>two</h1>
         <h3>three</h3>
     '''
     reason = TocGenerator(html).is_invalid()
     self.assertIn('<h3>three</h3>', reason.lower())
Esempio n. 4
0
 def test_invalid_level_of_headings_should_mention_reason(self):
     html = '''
         <h1>one</h1>
         <h1>two</h1>
         <h3>three</h3>
     '''
     reason = TocGenerator(html).is_invalid()
     self.assertIn('<h3>three</h3>', reason.lower())