Commit 81340562 authored by Tatuya Kamada's avatar Tatuya Kamada

It is better to use a real skin folder in such a test.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36771 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 549366b5
...@@ -763,10 +763,10 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor): ...@@ -763,10 +763,10 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor):
group_dict[group] = id_list group_dict[group] = id_list
sequence.edit(form_id=form_id, group_dict=group_dict) sequence.edit(form_id=form_id, group_dict=group_dict)
def stepCreateNewFormIntoCustom(self, sequence=None, sequence_list=None): def stepCreateNewFormIntoErp5Base(self, sequence=None, sequence_list=None):
"""Create a new ERP5 Form in a skin folder.""" """Create a new ERP5 Form in a skin folder."""
ps = self.getSkinsTool() ps = self.getSkinsTool()
skin_folder = ps._getOb('custom', None) skin_folder = ps._getOb('erp5_base', None)
self.assertNotEquals(skin_folder, None) self.assertNotEquals(skin_folder, None)
form_id = 'Geek_view' form_id = 'Geek_view'
addERP5Form = skin_folder.manage_addProduct['ERP5Form'].addERP5Form addERP5Form = skin_folder.manage_addProduct['ERP5Form'].addERP5Form
...@@ -799,6 +799,19 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor): ...@@ -799,6 +799,19 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor):
form = skin_folder._getOb(form_id, None) form = skin_folder._getOb(form_id, None)
self.assertEquals(form, None) self.assertEquals(form, None)
def stepRemoveFormFromErp5Base(self, sequence=None, sequence_list=None):
"""Remove an ERP5 Form."""
ps = self.getSkinsTool()
skin_folder = ps._getOb('erp5_base', None)
self.assertNotEquals(skin_folder, None)
form_id = sequence.get('form_id')
form = skin_folder._getOb(form_id, None)
self.assertNotEquals(form, None)
skin_folder.manage_delObjects([form_id])
form = skin_folder._getOb(form_id, None)
self.assertEquals(form, None)
def stepAddFormField(self, sequence=None, sequence_list=None): def stepAddFormField(self, sequence=None, sequence_list=None):
"""Add a field to an ERP5 Form.""" """Add a field to an ERP5 Form."""
ps = self.getSkinsTool() ps = self.getSkinsTool()
...@@ -871,10 +884,10 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor): ...@@ -871,10 +884,10 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor):
form = skin_folder._getOb(form_id, None) form = skin_folder._getOb(form_id, None)
self.assertEquals(form, None) self.assertEquals(form, None)
def stepCheckFormIsNotRemovedFromCustom(self, sequence=None, sequence_list=None): def stepCheckFormIsNotRemovedFromErp5Base(self, sequence=None, sequence_list=None):
"""Check the form is not exist in custom.""" """Check the form is not exist in custom."""
ps = self.getSkinsTool() ps = self.getSkinsTool()
skin_folder = ps._getOb('custom', None) skin_folder = ps._getOb('erp5_base', None)
self.assertNotEquals(skin_folder, None) self.assertNotEquals(skin_folder, None)
form_id = sequence.get('form_id') form_id = sequence.get('form_id')
form = skin_folder._getOb(form_id, None) form = skin_folder._getOb(form_id, None)
...@@ -5355,7 +5368,7 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor): ...@@ -5355,7 +5368,7 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor):
LOG('Testing... ', 0, message) LOG('Testing... ', 0, message)
sequence_list = SequenceList() sequence_list = SequenceList()
sequence_string = '\ sequence_string = '\
CreateNewFormIntoCustom \ CreateNewFormIntoErp5Base \
CreateSkinFolder \ CreateSkinFolder \
CreateNewForm \ CreateNewForm \
CreateNewBusinessTemplate \ CreateNewBusinessTemplate \
...@@ -5385,7 +5398,7 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor): ...@@ -5385,7 +5398,7 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor):
Tic \ Tic \
\ \
CheckFormIsRemoved \ CheckFormIsRemoved \
CheckFormIsNotRemovedFromCustom \ CheckFormIsNotRemovedFromErp5Base \
' '
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
sequence_list.play(self, quiet=quiet) sequence_list.play(self, quiet=quiet)
......
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