mirror of https://github.com/scrapy/scrapy.git
Fix invalid XML samples in tests that break with lxml 6. (#6919)
This commit is contained in:
parent
ff7795b159
commit
eaae59fbef
|
|
@ -418,7 +418,7 @@ class CrawlSpiderWithParseMethod(MockServerSpider, CrawlSpider):
|
|||
async def start(self):
|
||||
test_body = b"""
|
||||
<html>
|
||||
<head><title>Page title<title></head>
|
||||
<head><title>Page title</title></head>
|
||||
<body>
|
||||
<p><a href="/status?n=200">Item 200</a></p> <!-- callback -->
|
||||
<p><a href="/status?n=201">Item 201</a></p> <!-- callback -->
|
||||
|
|
@ -472,7 +472,7 @@ class CrawlSpiderWithErrback(CrawlSpiderWithParseMethod):
|
|||
async def start(self):
|
||||
test_body = b"""
|
||||
<html>
|
||||
<head><title>Page title<title></head>
|
||||
<head><title>Page title</title></head>
|
||||
<body>
|
||||
<p><a href="/status?n=200">Item 200</a></p> <!-- callback -->
|
||||
<p><a href="/status?n=201">Item 201</a></p> <!-- callback -->
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ class Base:
|
|||
def test_nofollow(self):
|
||||
"""Test the extractor's behaviour for links with rel='nofollow'"""
|
||||
|
||||
html = b"""<html><head><title>Page title<title>
|
||||
html = b"""<html><head><title>Page title</title></head>
|
||||
<body>
|
||||
<div class='links'>
|
||||
<p><a href="/about.html">About us</a></p>
|
||||
|
|
@ -232,7 +232,7 @@ class Base:
|
|||
|
||||
def test_restrict_xpaths_encoding(self):
|
||||
"""Test restrict_xpaths with encodings"""
|
||||
html = b"""<html><head><title>Page title<title>
|
||||
html = b"""<html><head><title>Page title</title></head>
|
||||
<body><p><a href="item/12.html">Item 12</a></p>
|
||||
<div class='links'>
|
||||
<p><a href="/about.html">About us\xa3</a></p>
|
||||
|
|
@ -378,7 +378,7 @@ class Base:
|
|||
]
|
||||
|
||||
def test_base_url_with_restrict_xpaths(self):
|
||||
html = b"""<html><head><title>Page title<title><base href="http://otherdomain.com/base/" />
|
||||
html = b"""<html><head><title>Page title</title><base href="http://otherdomain.com/base/" /></head>
|
||||
<body><p><a href="item/12.html">Item 12</a></p>
|
||||
</body></html>"""
|
||||
response = HtmlResponse("http://example.org/somepage/index.html", body=html)
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@ class TestCSVFeedSpider(TestSpider):
|
|||
|
||||
|
||||
class TestCrawlSpider(TestSpider):
|
||||
test_body = b"""<html><head><title>Page title<title>
|
||||
test_body = b"""<html><head><title>Page title</title></head>
|
||||
<body>
|
||||
<p><a href="item/12.html">Item 12</a></p>
|
||||
<div class='links'>
|
||||
|
|
|
|||
Loading…
Reference in New Issue