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