Package CMFSetup :: Package tests :: Module test_typeinfo
[show private | hide private]
[frames | no frames]

Module CMFSetup.tests.test_typeinfo

Unit tests for type information export import

$Id: test_typeinfo.py 37135 2005-07-08 13:24:33Z tseaver $
Classes
DummyTypeInfo Mix-in class combining the most common set of basic mix-ins
DummyTypesTool Folders are basic container objects that provide a standard interface for object management.
OldTypeInfoImportConfiguratorTests  
Test_exportTypesTool  
Test_importTypesTool  
TypeInfoExportConfiguratorTests  
TypeInfoImportConfiguratorTests  
TypesToolExportConfiguratorTests  
TypesToolImportConfiguratorTests  
_TypeInfoSetup  

Function Summary
  test_suite()

Variable Summary
str _BAR_EXPORT = '<type-info\n   id="%s"\n   kind="Scriptab...
str _BAR_OLD_EXPORT = '<type-info\n   id="%s"\n   kind="Scri...
str _EMPTY_TOOL_EXPORT = '<?xml version="1.0"?>\n<types-tool...
str _FILENAME_EXPORT = '<?xml version="1.0"?>\n<types-tool>\...
str _FOO_EXPORT = '<type-info\n   id="%s"\n   kind="Factory-...
str _FOO_OLD_EXPORT = '<type-info\n   id="%s"\n   kind="Fact...
str _NORMAL_TOOL_EXPORT = '<?xml version="1.0"?>\n<types-too...
tuple _TI_LIST = ({'product': 'CMFSetup', 'content_icon': 'foo...
list _TI_LIST_WITH_FILENAME = [{'product': 'CMFSetup', 'conte...
str _UPDATE_FOO_IMPORT = '<type-info id="foo">\n  <aliases>\...
str _UPDATE_TOOL_IMPORT = '<?xml version="1.0"?>\n<types-too...

Variable Details

_BAR_EXPORT

Type:
str
Value:
'''<type-info
   id="%s"
   kind="Scriptable Type Information">
  <property name="title">Bar</property>
  <property name="description">Bar things</property>
  <property name="content_icon">bar.png</property>
  <property name="content_meta_type">Bar Thing</property>
  <property name="permission">Add portal content</property>
...                                                                    

_BAR_OLD_EXPORT

Type:
str
Value:
'''<type-info
   id="%s"
   kind="Scriptable Type Information"
   title="Bar"
   meta_type="Bar Thing"
   icon="bar.png"
   constructor_path="make_bar"
   permission="Add portal content"
...                                                                    

_EMPTY_TOOL_EXPORT

Type:
str
Value:
'''<?xml version="1.0"?>
<types-tool>
</types-tool>
'''                                                                    

_FILENAME_EXPORT

Type:
str
Value:
'''<?xml version="1.0"?>
<types-tool>
 <type id="foo object" filename="types/foo_object.xml" />
 <type id="bar object" filename="types/bar_object.xml" />
</types-tool>
'''                                                                    

_FOO_EXPORT

Type:
str
Value:
'''<type-info
   id="%s"
   kind="Factory-based Type Information">
  <property name="title">Foo</property>
  <property name="description">Foo things</property>
  <property name="content_icon">foo.png</property>
  <property name="content_meta_type">Foo Thing</property>
  <property name="product">CMFSetup</property>
...                                                                    

_FOO_OLD_EXPORT

Type:
str
Value:
'''<type-info
   id="%s"
   kind="Factory-based Type Information"
   title="Foo"
   meta_type="Foo Thing"
   icon="foo.png"
   product="CMFSetup"
   factory="addFoo"
...                                                                    

_NORMAL_TOOL_EXPORT

Type:
str
Value:
'''<?xml version="1.0"?>
<types-tool>
 <type id="foo" />
 <type id="bar" />
</types-tool>
'''                                                                    

_TI_LIST

Type:
tuple
Value:
({'actions': ({'action': 'string:${object_url}/foo_view',
               'id': 'view',
               'name': 'View',
               'permissions': ('View',)},
              {'action': 'string:${object_url}/foo_edit_form',
               'id': 'edit',
               'name': 'Edit',
               'permissions': ('Modify portal content',)},
...                                                                    

_TI_LIST_WITH_FILENAME

Type:
list
Value:
[{'actions': ({'action': 'string:${object_url}/foo_view',
               'id': 'view',
               'name': 'View',
               'permissions': ('View',)},
              {'action': 'string:${object_url}/foo_edit_form',
               'id': 'edit',
               'name': 'Edit',
               'permissions': ('Modify portal content',)},
...                                                                    

_UPDATE_FOO_IMPORT

Type:
str
Value:
'''<type-info id="foo">
  <aliases>
   <alias from="spam" to="eggs"/>
  </aliases>
</type-info>
'''                                                                    

_UPDATE_TOOL_IMPORT

Type:
str
Value:
'''<?xml version="1.0"?>
<types-tool>
 <type id="foo"/>
</types-tool>
'''                                                                    

Generated by Epydoc 2.1 on Wed Nov 30 03:58:39 2005 http://epydoc.sf.net