Commit 7aaa8c48 authored by Łukasz Nowak's avatar Łukasz Nowak

- simplify tests for overlapping names of two different filesystem objects,...

 - simplify tests for overlapping names of two different filesystem objects, to avoid unnecessary hacking of Business Template (Property Sheets were moved into ZODB)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@45171 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 526f4e41
...@@ -7310,6 +7310,11 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor): ...@@ -7310,6 +7310,11 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor):
self.assertEqual(os.path.basename(sequence['document_path']), self.assertEqual(os.path.basename(sequence['document_path']),
os.path.basename(sequence['ps_path'])) os.path.basename(sequence['ps_path']))
def stepCheckDocumentTestSameName(self, sequence=None, **kw):
self.assertEqual(sequence['test_title'], sequence['document_title'])
self.assertEqual(os.path.basename(sequence['document_path']),
os.path.basename(sequence['test_path']))
save_current_business_template_sequence_string = '\ save_current_business_template_sequence_string = '\
CheckNotInstalledInstallationState \ CheckNotInstalledInstallationState \
BuildBusinessTemplate \ BuildBusinessTemplate \
...@@ -7388,8 +7393,14 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor): ...@@ -7388,8 +7393,14 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor):
""" """
sequence['current_bt'].edit(template_property_sheet_id_list=[]) sequence['current_bt'].edit(template_property_sheet_id_list=[])
def test_BusinessTemplateWithDocumentPropertySheetRemoved(self): def stepRemoveTestFromBusinessTemplate(self, sequence=None, **kw):
"""Checks that if Business Template defines Document and PropertySheet """
Add Property Sheet to Business Template
"""
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 Document is not removed
This test uses simulation of pre-property sheet migration to have non unique This test uses simulation of pre-property sheet migration to have non unique
...@@ -7397,16 +7408,16 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor): ...@@ -7397,16 +7408,16 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor):
sequence_list = SequenceList() sequence_list = SequenceList()
sequence_string = '\ sequence_string = '\
CreateDocument \ CreateDocument \
CreatePropertySheet \ CreateTest \
CheckDocumentPropertySheetSameName \ CheckDocumentTestSameName \
CreateNewBusinessTemplate \ CreateNewBusinessTemplate \
UseExportBusinessTemplate \ UseExportBusinessTemplate \
AddDocumentToBusinessTemplate \ AddDocumentToBusinessTemplate \
AddPropertySheetToBusinessTemplate \ AddTestToBusinessTemplate \
CheckModifiedBuildingState \ CheckModifiedBuildingState \
' + self.save_current_business_template_sequence_string + '\ ' + self.save_current_business_template_sequence_string + '\
RemoveDocument \ RemoveDocument \
RemovePropertySheet \ RemoveTest \
RemoveBusinessTemplate \ RemoveBusinessTemplate \
RemoveAllTrashBins \ RemoveAllTrashBins \
ImportBusinessTemplate \ ImportBusinessTemplate \
...@@ -7419,12 +7430,12 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor): ...@@ -7419,12 +7430,12 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor):
CheckBuiltBuildingState \ CheckBuiltBuildingState \
CheckNoTrashBin \ CheckNoTrashBin \
CheckDocumentExists \ CheckDocumentExists \
CheckPropertySheetExists \ CheckTestExists \
\ \
SimulateAndCopyPrePropertySheetMigrationBusinessTemplate \ CopyBusinessTemplate \
Tic \ Tic \
\ \
RemovePropertySheetFromBusinessTemplate \ RemoveTestFromBusinessTemplate \
CheckModifiedBuildingState \ CheckModifiedBuildingState \
' + self.save_current_business_template_sequence_string + '\ ' + self.save_current_business_template_sequence_string + '\
ImportBusinessTemplate \ ImportBusinessTemplate \
...@@ -7436,7 +7447,7 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor): ...@@ -7436,7 +7447,7 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor):
\ \
CheckInstalledInstallationState \ CheckInstalledInstallationState \
CheckBuiltBuildingState \ CheckBuiltBuildingState \
CheckPropertySheetRemoved \ CheckTestRemoved \
CheckDocumentExists \ CheckDocumentExists \
' '
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
......
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