'Test if customization of request_fingerprint method will change
output of request_seen.'

def test_request_fingerprint(self):

    r1 = Request('http://scrapytest.org/index.html')
    r2 = Request('http://scrapytest.org/INDEX.html')
    dupefilter = RFPDupeFilter()
    dupefilter.open()
    assert (not dupefilter.request_seen(r1))
    assert (not dupefilter.request_seen(r2))
    dupefilter.close('finished')
    class CaseInsensitiveRFPDupeFilter(RFPDupeFilter, ):
        def request_fingerprint(self, request):
            fp = hashlib.sha1()
            fp.update(to_bytes(request.url.lower()))
            return fp.hexdigest()
    case_insensitive_dupefilter = CaseInsensitiveRFPDupeFilter()
    case_insensitive_dupefilter.open()
    assert (not case_insensitive_dupefilter.request_seen(r1))
    assert case_insensitive_dupefilter.request_seen(r2)
    case_insensitive_dupefilter.close('finished')
