erp5_catalog: [WORKAROUND] Explicitly call reset for component_tool in test.
Problem: This is a workaround for components being unable to get registered during the tests. Explanation: After adding document component object, _p_oid is generated at the last step of commit hook. This leads to problem that _registry_dict for dynamic_class 'erp5.component.document' isn't getting updated with the _p_oid of the component created. This leads to failing of test because to validate object with same reference, the checkConsistency function checks in the _registry_dict for reference and _p_oid. Solution: Explicilty calling transaction.savepoint here generates the oid before validation, hence make it available for the registry_dict in time. But, this clearly is a workaround which is clearly not solving the real problem of why the _p_oid isn't being generated at the right step.
Showing
Please register or sign in to comment