From 649516e22119678fbf5544267105c9a560c25156 Mon Sep 17 00:00:00 2001
From: Arnaud Fontaine <arnaud.fontaine@nexedi.com>
Date: Fri, 1 Apr 2011 04:09:59 +0000
Subject: [PATCH] Cookies class is a dict-like object

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk/utils@44969 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 erp5/util/test_browser/browser.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/erp5/util/test_browser/browser.py b/erp5/util/test_browser/browser.py
index 73159a6064..4749608951 100644
--- a/erp5/util/test_browser/browser.py
+++ b/erp5/util/test_browser/browser.py
@@ -205,20 +205,20 @@ class Browser(ExtendedTestBrowser):
     logging.info("Opening url: " + absolute_url)
     super(Browser, self).open(absolute_url, data)
 
-  def getCookieValue(self, cookie_name, default=None):
+  def getCookieValue(self, name, default=None):
     """
     Get the cookie value of the given cookie name.
 
-    @param cookie_name: Name of the cookie
-    @type cookie_name: str
+    @param name: Name of the cookie
+    @type name: str
     @param default: Fallback value if the cookie was not found
     @type default: str
     @return: Cookie value
     @rtype: str
     """
-    for cookie in self.cookies:
-      if cookie_name == cookie.name:
-        return cookie.value
+    for cookie_name, cookie_value in self.cookies.iteritems():
+      if name == cookie_name:
+        return cookie_value
 
     return default
 
-- 
2.30.9