MCPcopy
hub / github.com/scrapy/scrapy / test_follow_all_xpath

Method test_follow_all_xpath

tests/test_http_response_text.py:437–444  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

435 assert expected == extracted2
436
437 def test_follow_all_xpath(self):
438 expected = [
439 "http://example.com/sample3.html",
440 "http://example.com/innertag.html",
441 ]
442 response = self._links_response()
443 extracted = response.follow_all(xpath='//a[contains(@href, "example.com")]')
444 assert expected == [r.url for r in extracted]
445
446 def test_follow_all_xpath_skip_invalid(self):
447 expected = [

Callers

nothing calls this directly

Calls 2

_links_responseMethod · 0.80
follow_allMethod · 0.45

Tested by

no test coverage detected