def test_fetch_cfr_parts(self): notice_xml = etree.fromstring(u""" <RULE> <PREAMB> <CFR>12 CFR Parts 1002, 1024, and 1026</CFR> </PREAMB> </RULE> """) result = build.fetch_cfr_parts(notice_xml) self.assertEqual(result, ['1002', '1024', '1026'])
def test_fetch_cfr_parts(self): with self.tree.builder("RULE") as rule: with rule.PREAMB() as preamb: preamb.CFR("12 CFR Parts 1002, 1024, and 1026") result = build.fetch_cfr_parts(self.tree.render_xml()) self.assertEqual(result, ['1002', '1024', '1026'])
def test_fetch_cfr_parts(self): with XMLBuilder("RULE") as ctx: with ctx.PREAMB(): ctx.CFR("12 CFR Parts 1002, 1024, and 1026") result = build.fetch_cfr_parts(ctx.xml) self.assertEqual(result, ['1002', '1024', '1026'])