'Test the extractor\'s behaviour among different situations'

def test_extraction_using_single_values(self):

    lx = self.extractor_cls(allow='sample')
    self.assertEqual([link for link in lx.extract_links(self.response)], [Link(url='http://example.com/sample1.html', text=u''), Link(url='http://example.com/sample2.html', text=u'sample    2'), Link(url='http://example.com/sample3.html', text=u'sample    3    text'), Link(url='http://example.com/sample3.html#foo', text='sample    3    repetition    with    fragment')])
    lx = self.extractor_cls(allow='sample', deny='3')
    self.assertEqual([link for link in lx.extract_links(self.response)], [Link(url='http://example.com/sample1.html', text=u''), Link(url='http://example.com/sample2.html', text=u'sample    2')])
    lx = self.extractor_cls(allow_domains='google.com')
    self.assertEqual([link for link in lx.extract_links(self.response)], [Link(url='http://www.google.com/something', text=u'')])
    lx = self.extractor_cls(deny_domains='example.com')
    self.assertEqual([link for link in lx.extract_links(self.response)], [Link(url='http://www.google.com/something', text=u'')])
