From 7c4c17088afe1df9d5519223625d4fbc183e7134 Mon Sep 17 00:00:00 2001 From: Pablo Hoffman Date: Tue, 24 Mar 2009 21:21:39 +0000 Subject: [PATCH] added copy tests for Headers which need to pass but are currently failing --HG-- extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%401014 --- scrapy/trunk/scrapy/tests/test_http_headers.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scrapy/trunk/scrapy/tests/test_http_headers.py b/scrapy/trunk/scrapy/tests/test_http_headers.py index ddf65e005..fd444d953 100644 --- a/scrapy/trunk/scrapy/tests/test_http_headers.py +++ b/scrapy/trunk/scrapy/tests/test_http_headers.py @@ -1,4 +1,5 @@ import unittest +import copy from scrapy.http import Headers @@ -73,4 +74,10 @@ class HeadersTest(unittest.TestCase): self.assertEqual(h.getlist('Content-Type'), ['text/html']) self.assertEqual(h.getlist('X-Forwarded-For'), ['ip1', 'ip2']) + #def test_copy(self): + # h1 = Headers({'header1': ['value1', 'value2']}) + # h2 = copy.copy(h1) + # self.assertEqual(h1, h2) + # self.assertEqual(h1.getlist('header1'), h2.getlist('header1')) + # assert h1.getlist('header1') is not h2.getlist('header1')