Commit 406e48ed authored by Arnaud Fontaine's avatar Arnaud Fontaine

testBusinessTemplate: When one Unit Test failed, subsequent tests were failing...

testBusinessTemplate: When one Unit Test failed, subsequent tests were failing too as objects remained.
parent 6dc5e1cb
Pipeline #8031 failed with stage
in 0 seconds
......@@ -7564,6 +7564,11 @@ class _ZodbComponentTemplateItemMixin(BusinessTemplateMixin):
"""
def stepCreateZodbDocument(self, sequence=None, **kw):
document_id = self.component_id_prefix + '.erp5.' + self.document_title
# Delete the Component created by previous tests executions
if document_id in self.portal.portal_components.objectIds():
self.portal.portal_components.manage_delObjects([document_id])
self.commit()
component = self.portal.portal_components.newContent(
id=document_id,
version='erp5',
......
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