Commit b8feca7b authored by Jérome Perrin's avatar Jérome Perrin

make sure current_app exists in setUp



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11761 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2bcaafe8
...@@ -472,6 +472,10 @@ def setupERP5Site( business_template_list=(), ...@@ -472,6 +472,10 @@ def setupERP5Site( business_template_list=(),
try: try:
if app is None: if app is None:
app = ZopeTestCase.app() app = ZopeTestCase.app()
# this app will be closed after setUp, but keep an reference anyway, to
# make it's REQUEST available during setup
global current_app
current_app = app
if not hasattr(aq_base(app), portal_name): if not hasattr(aq_base(app), portal_name):
try: try:
_start = time.time() _start = time.time()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment