Commit 5e3b473e authored by Romain Courteaud's avatar Romain Courteaud

Patch portal type class to reduce side effect

parent de9fcdf3
......@@ -172,9 +172,11 @@ class TestSlapOSAccountingInteractionWorkflow(testSlapOSMixin):
return self.fixConsistency_call()
# Replace serialize by a dummy method
from Products.ERP5Type.Base import Base
Base.fixConsistency_call = Base.fixConsistency
Base.fixConsistency = verify_fixConsistency_call
HostingSubscriptionClass = self.portal.portal_types.getPortalTypeClass(
'Hosting Subscription')
HostingSubscriptionClass.fixConsistency_call = HostingSubscriptionClass.\
fixConsistency
HostingSubscriptionClass.fixConsistency = verify_fixConsistency_call
try:
# manage_afterAdd
......@@ -189,7 +191,8 @@ class TestSlapOSAccountingInteractionWorkflow(testSlapOSMixin):
template_hosting_subscription.Base_createCloneDocument,
batch_mode=1)
finally:
Base.fixConsistency = Base.fixConsistency_call
self.portal.portal_types.resetDynamicDocumentsOnceAtTransactionBoundary()
transaction.commit()
def _simulateDelivery_calculate(self):
script_name = 'Delivery_calculate'
......
56
\ No newline at end of file
57
\ No newline at end of file
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