def test_get_subpart_group_title_em(): with XMLBuilder("SUBPART") as ctx: ctx.child_from_string( u'<HD SOURCE="HED">Subpart B—<E T="0714">Partes</E> Review</HD>') subpart_title = reg_text.get_subpart_group_title(ctx.xml) assert subpart_title == u'Subpart B—Partes Review'
def test_get_subpart_group_title_reserved(): with XMLBuilder("SUBPART") as ctx: ctx.RESERVED("Subpart J [Reserved]") subpart_title = reg_text.get_subpart_group_title(ctx.xml) assert subpart_title == u'Subpart J [Reserved]'
def test_get_subpart_group_title(): with XMLBuilder("SUBPART") as ctx: ctx.HD(u"Subpart A—First subpart") subpart_title = reg_text.get_subpart_group_title(ctx.xml) assert subpart_title == u'Subpart A—First subpart'