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