[test] unicode name/value in cookie makes tests failing (SimpleCookie then suppose it's a dict...) stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 26 Sep 2011 19:45:51 +0200
branchstable
changeset 7870 1a1e04163cde
parent 7867 0abed94a9859
child 7871 29fc83fca803
child 7872 0d0b8b3a015d
[test] unicode name/value in cookie makes tests failing (SimpleCookie then suppose it's a dict...)
devtools/fake.py
web/request.py
--- a/devtools/fake.py	Mon Sep 26 19:09:12 2011 +0200
+++ b/devtools/fake.py	Mon Sep 26 19:45:51 2011 +0200
@@ -1,4 +1,4 @@
-# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
 #
 # This file is part of CubicWeb.
--- a/web/request.py	Mon Sep 26 19:09:12 2011 +0200
+++ b/web/request.py	Mon Sep 26 19:45:51 2011 +0200
@@ -547,8 +547,8 @@
         else:
             expires = None
         # make sure cookie is set on the correct path
-        cookie = Cookie(name, value, self.base_url_path(), expires=expires,
-                        secure=secure)
+        cookie = Cookie(str(name), str(value), self.base_url_path(),
+                        expires=expires, secure=secure)
         self.headers_out.addHeader('Set-cookie', cookie)
 
     def remove_cookie(self, name, bwcompat=None):