From 84a9d6abdc0b01fe79a0bf7fbedfe4dda1dff554 Mon Sep 17 00:00:00 2001
From: Leonardo Rochael Almeida <leonardo@nexedi.com>
Date: Wed, 10 Feb 2010 20:46:13 +0000
Subject: [PATCH] clean up some user traces from REQUEST on logout

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32423 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Type/tests/ERP5TypeTestCase.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/product/ERP5Type/tests/ERP5TypeTestCase.py b/product/ERP5Type/tests/ERP5TypeTestCase.py
index 080987bb4c..16b853ad8b 100644
--- a/product/ERP5Type/tests/ERP5TypeTestCase.py
+++ b/product/ERP5Type/tests/ERP5TypeTestCase.py
@@ -334,6 +334,13 @@ class ERP5TypeTestCase(backportUnittest.TestCase, PortalTestCase):
       """
       PortalTestCase.login(self, user_name)
 
+    def logout(self):
+      PortalTestCase.logout(self)
+      # clean up certain cache related REQUEST keys that might be associated
+      # with the logged in user
+      for key in ('_ec_cache', '_oai_cache'):
+        self.portal.REQUEST.other.pop(key, None)
+
     def _setupUser(self):
       '''Creates the default user.'''
       uf = self.portal.acl_users
-- 
2.30.9