Commit 24405ce5 authored by Arnaud Fontaine's avatar Arnaud Fontaine

ZODB Components: erp5_ical_style: Migrate testICal.

parent ff26b904
...@@ -63,7 +63,7 @@ class TestICal(ERP5TypeTestCase): ...@@ -63,7 +63,7 @@ class TestICal(ERP5TypeTestCase):
""" """
if hasattr(self.portal.person_module, 'one'): if hasattr(self.portal.person_module, 'one'):
self.portal.person_module.manage_delObjects(['one']) self.portal.person_module.manage_delObjects(['one'])
one = self.portal.person_module.newContent(id="one", title="One", description="Person One") self.portal.person_module.newContent(id="one", title="One", description="Person One")
self.tic() self.tic()
def parseICalFeed(self, feed_string): def parseICalFeed(self, feed_string):
...@@ -87,8 +87,8 @@ class TestICal(ERP5TypeTestCase): ...@@ -87,8 +87,8 @@ class TestICal(ERP5TypeTestCase):
""" """
Get the feed using form rendered by ical_view pt Get the feed using form rendered by ical_view pt
""" """
self.request.set('portal_skin', 'iCal'); self.request.set('portal_skin', 'iCal')
self.portal.portal_skins.changeSkin('iCal'); self.portal.portal_skins.changeSkin('iCal')
feed_string = module.Folder_viewContentListAsICal() feed_string = module.Folder_viewContentListAsICal()
return self.parseICalFeed(feed_string) return self.parseICalFeed(feed_string)
...@@ -225,8 +225,8 @@ class TestICal(ERP5TypeTestCase): ...@@ -225,8 +225,8 @@ class TestICal(ERP5TypeTestCase):
In this case pt for render current form('Test_view') is default page template(form_view) In this case pt for render current form('Test_view') is default page template(form_view)
""" """
if not run: return if not run: return
self.request.set('portal_skin', 'iCal'); self.request.set('portal_skin', 'iCal')
self.portal.portal_skins.changeSkin('iCal'); self.portal.portal_skins.changeSkin('iCal')
self.portal.manage_addProduct['ERP5Form'].addERP5Form('Test_view', 'View') self.portal.manage_addProduct['ERP5Form'].addERP5Form('Test_view', 'View')
self.portal.Test_view.manage_addField('listbox', 'listbox', 'ListBox') self.portal.Test_view.manage_addField('listbox', 'listbox', 'ListBox')
...@@ -245,7 +245,6 @@ class TestICal(ERP5TypeTestCase): ...@@ -245,7 +245,6 @@ class TestICal(ERP5TypeTestCase):
count_method='countFolder', count_method='countFolder',
selection_name='ical_folder_selection')) selection_name='ical_folder_selection'))
module = self.portal.person_module
one = self.portal.person_module.one one = self.portal.person_module.one
feed_string = self.portal.person_module.Test_view() feed_string = self.portal.person_module.Test_view()
feed_dict = self.parseICalFeed(feed_string) feed_dict = self.parseICalFeed(feed_string)
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testICal</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.tests.testICal</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testICal</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
test.erp5.testICal
\ No newline at end of file
erp5_full_text_myisam_catalog
erp5_base
erp5_pdm
erp5_simulation
erp5_trade
erp5_project
erp5_crm
\ No newline at end of file
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