示例#1
0
    def test_remove_anchors_aa_eedboard(self):
        jspf = OldJournalPageFile(self.html_file('aa_eedboard'))

        self.assertEqual(jspf.body_content.count('class="subtitulo"'), 4)
        self.assertTrue(
            '<p class="subtitulo"><a name="001">Editor-Jefe</a></p>' in
            jspf.body_content)
        self.assertTrue(
            '<p class="subtitulo"><a name="0011"></a>Editor-Jefe Sustituto</p>'
            in jspf.body_content)

        self.assertTrue('<a name="0011"' in jspf.body_content)
        jspf._remove_anchors()
        self.assertTrue('<p class="subtitulo">Editor-Jefe Sustituto</p>' in
                        jspf.body_content)
示例#2
0
 def test_remove_anchors_abb_pinstruc(self):
     jspf = OldJournalPageFile(self.html_file('abb_pinstruc'))
     self.assertTrue('<a name="end"></a>' in jspf.body_content)
     jspf._remove_anchors()
     self.assertTrue('<a name="end"></a>' not in jspf.body_content)