(self)
| 316 | self.assertStat(content_type='foo') |
| 317 | |
| 318 | def test_non_html(self): |
| 319 | # Should search only XML and HTML for links, not other content types. |
| 320 | body = ('<a href="{}">'.format(self.app_url)).encode('utf-8') |
| 321 | |
| 322 | self.add_page('/xml', body=body, content_type='application/xml') |
| 323 | self.crawl([self.app_url + '/xml']) |
| 324 | self.assertStat(0, content_type='application/xml', num_urls=1) |
| 325 | self.assertStat(1, url=self.app_url + '/') |
| 326 | |
| 327 | self.add_page('/image', content_type='image') |
| 328 | self.crawl([self.app_url + '/image']) |
| 329 | self.assertStat(content_type='image', num_urls=0) |
| 330 | |
| 331 | def test_non_http(self): |
| 332 | body = '<a href="ftp://example.com">'.encode('utf-8') |
nothing calls this directly
no test coverage detected