Commit ddff3b95 authored by Arnaud Fontaine's avatar Arnaud Fontaine

ZODB Components: Add unit test for upgrade of bt5 from filesystem to ZODB.

parent 1b394d11
...@@ -7415,6 +7415,66 @@ class TestDocumentTemplateItem(BusinessTemplateMixin): ...@@ -7415,6 +7415,66 @@ class TestDocumentTemplateItem(BusinessTemplateMixin):
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
sequence_list.play(self) sequence_list.play(self)
def stepUseCurrentBusinessTemplateForInstall(self, sequence=None, **kw):
sequence.edit(import_bt=sequence.get('current_bt'))
def test_BusinessTemplateUpgradeDocumentFromFilesystemToZodb(self):
sequence_list = SequenceList()
sequence_string = """
CreateDocument
CreateNewBusinessTemplate
UseExportBusinessTemplate
AddDocumentToBusinessTemplate
CheckModifiedBuildingState
CheckNotInstalledInstallationState
BuildBusinessTemplate
CheckBuiltBuildingState
CheckNotInstalledInstallationState
CheckObjectPropertiesInBusinessTemplate
UseCurrentBusinessTemplateForInstall
InstallWithoutForceBusinessTemplate
Tic
CheckInstalledInstallationState
CheckBuiltBuildingState
CheckSkinsLayers
CheckDocumentExists
CopyAndMigrateDocumentBusinessTemplate
CheckDocumentMigration
BuildBusinessTemplate
CheckBuiltBuildingState
CheckNotInstalledInstallationState
SaveBusinessTemplate
RemoveBusinessTemplate
RemoveZodbDocument
CheckDocumentExists
CheckZodbDocumentRemoved
ImportBusinessTemplate
UseImportBusinessTemplate
CheckBuiltBuildingState
CheckNotInstalledInstallationState
InstallWithoutForceBusinessTemplate
Tic
CheckInstalledInstallationState
CheckBuiltBuildingState
CheckSkinsLayers
CheckDocumentRemoved
CheckZodbDocumentExistsAndValidated
UseExportBusinessTemplate
CheckReplacedInstallationState
UseImportBusinessTemplate
UninstallBusinessTemplate
RemoveAllTrashBins
CheckBuiltBuildingState
CheckNotInstalledInstallationState
CheckZodbDocumentRemoved
"""
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
class TestConstraintTemplateItem(TestDocumentTemplateItem): class TestConstraintTemplateItem(TestDocumentTemplateItem):
document_title = 'UnitTest' document_title = 'UnitTest'
document_data = ' \nclass UnitTest: \n """ \n Fake constraint for unit test \n \ document_data = ' \nclass UnitTest: \n """ \n Fake constraint for unit test \n \
...@@ -7556,6 +7616,9 @@ TestConstraintTemplateItem.test_BusinessTemplateWithZodbDocumentNonExistingBefor ...@@ -7556,6 +7616,9 @@ TestConstraintTemplateItem.test_BusinessTemplateWithZodbDocumentNonExistingBefor
TestConstraintTemplateItem.test_BusinessTemplateWithZodbDocumentMigrated = \ TestConstraintTemplateItem.test_BusinessTemplateWithZodbDocumentMigrated = \
skip('Not implemented yet')(TestConstraintTemplateItem.test_BusinessTemplateWithZodbDocumentMigrated) skip('Not implemented yet')(TestConstraintTemplateItem.test_BusinessTemplateWithZodbDocumentMigrated)
TestConstraintTemplateItem.test_BusinessTemplateUpgradeDocumentFromFilesystemToZodb = \
skip('Not implemented yet')(TestConstraintTemplateItem.test_BusinessTemplateUpgradeDocumentFromFilesystemToZodb)
def test_suite(): def test_suite():
suite = unittest.TestSuite() suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestBusinessTemplate)) suite.addTest(unittest.makeSuite(TestBusinessTemplate))
......
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