'Test Request copy'

def test_copy(self):

    def somecallback():
        pass
    r1 = self.request_class('http://www.example.com', callback=somecallback, errback=somecallback)
    r1.meta['foo'] = 'bar'
    r2 = r1.copy()
    assert (r1.callback is somecallback)
    assert (r1.errback is somecallback)
    assert (r2.callback is r1.callback)
    assert (r2.errback is r2.errback)
    assert (r1.meta is not r2.meta), 'meta    must    be    a    shallow    copy,    not    identical'
    self.assertEqual(r1.meta, r2.meta)
    assert (r1.headers is not r2.headers), 'headers    must    be    a    shallow    copy,    not    identical'
    self.assertEqual(r1.headers, r2.headers)
    self.assertEqual(r1.encoding, r2.encoding)
    self.assertEqual(r1.dont_filter, r2.dont_filter)
