From 940d0090af06d2cfa2577a7a67b2e63590ad1c57 Mon Sep 17 00:00:00 2001 From: Pablo Hoffman Date: Mon, 27 Apr 2009 18:18:01 +0000 Subject: [PATCH] commented out irrelevant cookie test, and converted file to use encoded chars instead of real chars with a encoding declaration on top --HG-- extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%401097 --- scrapy/trunk/scrapy/tests/test_http_cookies.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scrapy/trunk/scrapy/tests/test_http_cookies.py b/scrapy/trunk/scrapy/tests/test_http_cookies.py index 3478af25a..6d79d1397 100644 --- a/scrapy/trunk/scrapy/tests/test_http_cookies.py +++ b/scrapy/trunk/scrapy/tests/test_http_cookies.py @@ -1,4 +1,3 @@ -# -*- coding: latin-1 -*- """Tests for cookielib.py.""" import re, os, time @@ -950,18 +949,21 @@ class LWPCookieTests(TestCase): "foo = bar; version = 1") cookie = interact_2965( - c, "http://www.acme.com/foo%2f%25/<<%0anewå/æøå", + c, "http://www.acme.com/foo%2f%25/<<%0anew\xc3\xa5/\xc3\xa6\xc3\xb8\xc3\xa5", 'bar=baz; path="/foo/"; version=1'); version_re = re.compile(r'^\$version=\"?1\"?', re.I) # FIXME: test disabled until fix #self.assert_("foo=bar" in cookie and version_re.search(cookie)) cookie = interact_2965( - c, "http://www.acme.com/foo/%25/<<%0anewå/æøå") + c, "http://www.acme.com/foo/%25/<<%0anew\xc3\xa5/\xc3\xa6\xc3\xb8\xc3\xa5") self.assert_(not cookie) # unicode URL doesn't raise exception - cookie = interact_2965(c, u"http://www.acme.com/\xfc") + ## NOTE: this test is commented because it doesn't really test anything + ## useful any it conflicts with Scrapy management of response urls which + ## are not allowed to be unicode (except for encoding-aware responses) + #cookie = interact_2965(c, u"http://www.acme.com/\xfc") def test_netscape_misc(self): # Some additional Netscape cookies tests.