コード例 #1
0
 def test_parse_appendix_elements_with_interp_ref(self):
     from regulations3k.scripts.ecfr_importer import PAYLOAD
     PAYLOAD.interp_refs.update(
         {'1002-A': {'1': 'see(1002-A-1-Interp)'}})
     p_soup = bS(self.test_xml, 'lxml-xml')
     appendix = p_soup.find('DIV5').find('DIV9')
     parsed_appendix = parse_appendix_elements(appendix, '1002-A')
     self.assertIn("see(1002-A-1-Interp)", parsed_appendix)
コード例 #2
0
 def test_parse_appendix_elements_with_interp_ref(self):
     PAYLOAD.interp_refs.update({'A': {'1': 'see(A-1-Interp)'}})
     p_soup = bS(self.test_xml, 'lxml-xml')
     appendix = p_soup.find('DIV5').find('DIV9')
     parsed_appendix = ecfr_importer.parse_appendix_elements(appendix, 'A')
     self.assertIn("{1}", parsed_appendix)
     self.assertIn("(print or type):__", parsed_appendix)
     self.assertIn("<table>", parsed_appendix)
     self.assertIn("![image-A-1]", parsed_appendix)
     self.assertIn("{table-A-0}", PAYLOAD.tables.keys())
コード例 #3
0
 def test_parse_appendix_elements_with_interp_ref(self):
     PAYLOAD.interp_refs.update(
         {'A': {'1': 'see(A-1-Interp)'}})
     p_soup = bS(self.test_xml, 'lxml-xml')
     appendix = p_soup.find('DIV5').find('DIV9')
     parsed_appendix = ecfr_importer.parse_appendix_elements(
         appendix, 'A')
     self.assertIn("{1}", parsed_appendix)
     self.assertIn("(print or type):__", parsed_appendix)
     self.assertIn("<table>", parsed_appendix)
     self.assertIn("![image-A-1]", parsed_appendix)
     self.assertIn("{table-A-0}", PAYLOAD.tables.keys())
コード例 #4
0
 def test_parse_appendix_elements(self):
     p_soup = bS(self.test_xml, 'lxml-xml')
     appendix = p_soup.find('DIV5').find('DIV9')
     parsed_appendix = parse_appendix_elements(appendix, '1002-A')
     self.assertIn("**1.", parsed_appendix)
コード例 #5
0
 def test_parse_appendix_elements(self):
     p_soup = bS(self.test_xml, 'lxml-xml')
     appendix = p_soup.find('DIV5').find('DIV9')
     parsed_appendix = ecfr_importer.parse_appendix_elements(
         appendix, 'A')
     self.assertIn("**1.", parsed_appendix)