Fix bad test case

This commit is contained in:
Samuel Bartlett 2023-03-31 08:30:19 +00:00
parent 7cb7cf1ad1
commit 00d93026c8
1 changed files with 2 additions and 2 deletions

View File

@ -818,11 +818,11 @@ class LxmlLinkExtractorTestCase(Base.LinkExtractorTestCase):
def test_skip_bad_links(self):
html = b"""
<a href="http://example.org/ignore_links : http://example.com/like_this">Why would you do this?</a>
<a href="http://Some wierd html : http://example.com/like_this">Why would you do this?</a>
<a href="http://example.org/item2.html">Good Link</a>
<a href="http://example.org/item3.html">Good Link 2</a>
"""
response = HtmlResponse("http://example.org/index.html", body=html)
response = HtmlResponse("http://example.org/index.html", body=html, encoding='utf-8')
lx = self.extractor_cls()
self.assertEqual(
[link for link in lx.extract_links(response)],