Commit 65a6e925 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Add a workaround to make sure that get_request works.

git-svn-id: 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b92e5551
......@@ -6,6 +6,17 @@
__version__ = '0.3.0'
# XXX make sure that get_request works.
current_app = None
import Products.ERP5Type.Utils
import Globals
def get_request():
return current_app.REQUEST
Products.ERP5Type.Utils.get_request = get_request
Globals = get_request
from Testing import ZopeTestCase
from Testing.ZopeTestCase.PortalTestCase import PortalTestCase, user_name
from Products.CMFCore.utils import getToolByName
......@@ -314,6 +325,8 @@ def setupERP5Site(business_template_list=(), app=None, portal_name=portal_name,
if app is None:
app =
global current_app
current_app = app
if not hasattr(aq_base(app), portal_name):
_start = time.time()
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment