BaseSgmlLinkExtractor: Added unit test of a link with an inner tag

This commit is contained in:
Benoit Blanchon 2013-12-07 20:42:21 +01:00 committed by Daniel Graña
parent 7e4d62778e
commit c1cb418dee
2 changed files with 2 additions and 0 deletions

View File

@ -12,6 +12,7 @@
<a href='http://example.com/sample3.html' title='sample 3'>sample 3 text</a>
<a href='sample3.html'>sample 3 repetition</a>
<a href='http://www.google.com/something'></a>
<a href='http://example.com/innertag.html'><b>inner</b> tag</a>
</div>
</body>
</html>

View File

@ -123,6 +123,7 @@ class SgmlLinkExtractorTestCase(unittest.TestCase):
Link(url='http://example.com/sample2.html', text=u'sample 2'),
Link(url='http://example.com/sample3.html', text=u'sample 3 text'),
Link(url='http://www.google.com/something', text=u''),
Link(url='http://example.com/innertag.html', text=u'inner tag'),
])
lx = SgmlLinkExtractor(allow=('sample', ))