Commit 4efe7cac authored by Łukasz Nowak's avatar Łukasz Nowak

- check preinstall method when Document and Test with same name are used


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@45174 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c658c3a9
......@@ -7399,11 +7399,7 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor):
"""
sequence['current_bt'].edit(template_test_id_list=[])
def test_BusinessTemplateWithDocumentTestRemoved(self):
"""Checks that if Business Template defines Document and Test
Document is not removed"""
sequence_list = SequenceList()
sequence_string = '\
business_template_with_document_test = '\
CreateDocument \
CreateTest \
CheckDocumentTestSameName \
......@@ -7412,7 +7408,7 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor):
AddDocumentToBusinessTemplate \
AddTestToBusinessTemplate \
CheckModifiedBuildingState \
' + self.save_current_business_template_sequence_string + '\
' + save_current_business_template_sequence_string + '\
RemoveDocument \
RemoveTest \
RemoveBusinessTemplate \
......@@ -7420,7 +7416,13 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor):
ImportBusinessTemplate \
UseImportBusinessTemplate \
CheckBuiltBuildingState \
CheckNotInstalledInstallationState \
CheckNotInstalledInstallationState'
def test_BusinessTemplateWithDocumentTestRemoved(self):
"""Checks that if Business Template defines Document and Test
Document is not removed"""
sequence_list = SequenceList()
sequence_string = self.business_template_with_document_test + '\
InstallBusinessTemplate \
Tic \
CheckInstalledInstallationState \
......@@ -7450,6 +7452,20 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor):
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def stepCheckDocumenTestPreinstall(self, sequence=None, **kw):
bt = sequence['current_bt']
self.assertEqual(
{'UnitTest': ['New', 'Test']}, {'UnitTest': ['New', 'Document']}
)
def test_BusinessTemplateWithDocumentTestPreinstallCheck(self):
sequence_list = SequenceList()
sequence_string = self.business_template_with_document_test + '\
CheckDocumenTestPreinstall \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def stepCreateAllPropertySheetsFromFilesystem(self, sequence=None, **kw):
self.portal.portal_property_sheets.createAllPropertySheetsFromFilesystem()
......
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