Esempio n. 1
0
 def test_snip_html_metadata(self):
     """
     Ignore elem.metadata
     """
     from wptools.utils import snip_html
     txt = "<small class=\"metadata\">a</small>b"
     ans = '<span><span ignored></span>b</span>'
     self.assertEqual(snip_html(txt), ans)
Esempio n. 2
0
    def test_snip_html_metadata(self):
        """
        Ignore elem.metadata
        """
        from wptools.utils import snip_html

        txt = '<small class="metadata">a</small>b'
        ans = "<span><span ignored></span>b</span>"
        self.assertEqual(snip_html(txt), ans)
Esempio n. 3
0
 def test_snip_html_reference(self):
     from wptools.utils import snip_html
     txt = "a<sup class=\"reference\"><a href>[b]</a></sup>c"
     ans = "a<span><span ignored></span>c</span>"
     self.assertEqual(snip_html(txt), ans)
Esempio n. 4
0
    def test_snip_html_reference(self):
        from wptools.utils import snip_html

        txt = 'a<sup class="reference"><a href>[b]</a></sup>c'
        ans = "a<span><span ignored></span>c</span>"
        self.assertEqual(snip_html(txt), ans)