Commit 3fef2282 authored by Aurel's avatar Aurel

wip

parent fa189df2
......@@ -44,6 +44,7 @@ from Products.ERP5Type.dynamic.portal_type_class import synchronizeDynamicModule
from Products.ERP5Type.mixin.response_header_generator import ResponseHeaderGenerator
from zLOG import LOG, INFO, WARNING, ERROR
from zExceptions import BadRequest
from string import join
import os
import warnings
......@@ -2255,7 +2256,10 @@ class ERP5Generator(PortalGenerator):
workflow_list = ['business_template_building_workflow',
'business_template_installation_workflow']
tool = p.portal_workflow
tool.manage_delObjects(filter(tool.hasObject, workflow_list))
try:
tool.manage_delObjects(filter(tool.hasObject, workflow_list))
except BadRequest:
pass
self.bootstrap(tool, 'erp5_core', 'WorkflowTemplateItem', workflow_list)
tool.setChainForPortalTypes(('Business Template',), workflow_list)
......
......@@ -5,6 +5,7 @@ from UserDict import IterableUserDict
import Lifetime
import transaction
from Testing import ZopeTestCase
from ZServer.Testing import utils
from ZODB.POSException import ConflictError
from zLOG import LOG, ERROR
from Products.CMFActivity.Activity.Queue import VALIDATION_ERROR_DELAY
......@@ -147,7 +148,7 @@ class ProcessingNodeTestCase(ZopeTestCase.TestCase):
def startZServer(self, verbose=False):
"""Start HTTP ZServer in background"""
utils = ZopeTestCase.utils
#utils = ZopeTestCase.utils
if utils._Z2HOST is None:
from Products.ERP5Type.tests.runUnitTest import log_directory
log = os.path.join(log_directory, "Z2.log")
......@@ -239,7 +240,7 @@ class ProcessingNodeTestCase(ZopeTestCase.TestCase):
@classmethod
def unregisterNode(cls):
if ZopeTestCase.utils._Z2HOST is not None:
if utils._Z2HOST is not None:
self = cls('unregisterNode')
self.app = self._app()
self._registerNode(distributing=0, processing=0)
......
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