(self)
| 35 | assert spider._get_sitemap_body(response) == body |
| 36 | |
| 37 | def test_get_sitemap_body(self): |
| 38 | r = XmlResponse(url="http://www.example.com/", body=self.BODY) |
| 39 | self.assertSitemapBody(r, self.BODY) |
| 40 | |
| 41 | r = HtmlResponse(url="http://www.example.com/", body=self.BODY) |
| 42 | self.assertSitemapBody(r, None) |
| 43 | |
| 44 | r = Response(url="http://www.example.com/favicon.ico", body=self.BODY) |
| 45 | self.assertSitemapBody(r, None) |
| 46 | |
| 47 | r = XmlResponse(url="http://www.example.com/", body=b"") |
| 48 | self.assertSitemapBody(r, b"") |
| 49 | |
| 50 | def test_get_sitemap_body_gzip_headers(self): |
| 51 | r = Response( |
nothing calls this directly
no test coverage detected