def test_insert_section_links(self):
     """Ensure content with section sign becomes regs3k relative link."""
     test_regdown = ('Regdown with a linkable section § 1002.2(a).')
     test_result = insert_section_links(test_regdown)
     self.assertIn(REG_BASE.format('1002'), test_result)
 def test_section_blank_paragraph_ids(self):
     no_ids_ref = '1002.1()'
     test_url = get_url(no_ids_ref)
     self.assertEqual(test_url, REG_BASE.format('1002/1'))
 def test_section_with_paragraph_ids(self):
     ref_with_id = '1002.1(a)'
     test_url = get_url(ref_with_id)
     self.assertEqual(test_url, REG_BASE.format('1002/1') + '#a')
Exemple #4
0
 def test_insert_section_links(self):
     """Ensure content with section sign becomes regs3k relative link."""
     test_regdown = (
         'Regdown with a linkable section § 1002.2(a).')
     test_result = insert_section_links(test_regdown)
     self.assertIn(REG_BASE.format('1002'), test_result)
Exemple #5
0
 def test_section_blank_paragraph_ids(self):
     no_ids_ref = '1002.1()'
     test_url = get_url(no_ids_ref)
     self.assertEqual(test_url, REG_BASE.format('1002/1'))
Exemple #6
0
 def test_section_with_paragraph_ids(self):
     ref_with_id = '1002.1(a)'
     test_url = get_url(ref_with_id)
     self.assertEqual(test_url, REG_BASE.format('1002/1') + '#a')