Commit 3db4096e authored by Nicolas Wavrant's avatar Nicolas Wavrant

fixup! erp5-upgrader: new test for sequentiality of activities run by upgrader

parent 56eafa53
......@@ -135,12 +135,19 @@ class TestUpgrader(ERP5TypeTestCase):
id=script_constraint_id)
script_constraint.edit(script_id=self.script_id, constraint_type="pre_upgrade")
def stepCreatePersonPropertySheet(self, sequence=None):
def _createPersonEmptyPropertySheet(self):
portal = self.portal
property_sheet = getattr(portal.portal_property_sheets, self.property_sheet_id, None)
if property_sheet is None:
property_sheet = portal.portal_property_sheets.newContent(
portal_type="Property Sheet", id=self.property_sheet_id)
return property_sheet
def stepCreatePersonEmptyPropertySheet(self, sequence=None):
self._createPersonEmptyPropertySheet()
def stepCreatePersonPropertySheet(self, sequence=None):
property_sheet = self._createPersonEmptyPropertySheet()
script_constraint_id = "person_old_reference_constraint"
script_constraint = getattr(property_sheet, script_constraint_id, None)
if script_constraint is None:
......@@ -823,13 +830,13 @@ class TestUpgrader(ERP5TypeTestCase):
sequence_string = """
stepCreatePerson
stepValidatePerson
stepCreatePersonPropertySheet
stepCreatePersonEmptyPropertySheet
stepSetConstraintInPersonPortalType
stepSetPersonTitlePreUpgradeConstraint
stepSetPersonTitleUpgradeConstraint
stepSetPersonTitlePostUpgradeConstraint
stepTic
stepRunUpgrader
stepRunFullUpgrader
stepTic
stepCheckPersonTitleHasBeenSetByPersonTitlePostUpgradeConstraint
"""
......
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