def test_spider_with_inbuilt_selectors(self):
        """Test selectors for text, price, date and html extractors."""
        name = 'books.toscrape.com'
        spider = self.smanager.create(name)
        spec = self.smanager._specs["spiders"][name]
        t = [t for t in spec["templates"]
             if t['page_id'] == "0a96a4dba3c62275ecf13903f42a007dd06718d8"][0]
        response = HtmlResponse(t['url'], body=t['original_body'].encode('utf-8'))
        results = [i for i in spider.parse(response)
                   if hasattr(i, '__getitem__')]
        for result in results:
            result['posted'] = [result['posted'][0].strftime('%Y-%m-%d %H:%M')]
        self.assertEqual(results, t['_results'])
Test selectors for text, price, date and html extractors.
slybot/slybot/tests/test_selectors.py