[CMF-checkins] CVS: CMF/CMFCore/tests/base - dummy.py:1.5.2.1
Tres Seaver
tseaver@zope.com
Mon, 10 Mar 2003 18:50:29 -0500
Update of /cvs-repository/CMF/CMFCore/tests/base
In directory cvs.zope.org:/tmp/cvs-serv2028/CMFCore/tests/base
Modified Files:
Tag: tseaver-ti_apb_redux-branch
dummy.py
Log Message:
Landing 'tseaver-typeinfo_as_apb-branch' against current HEAD, using
a new integration branch:
- Merged the branch and fixed up all conflicts; all tests pass.
- Updated all the 'factory_type_information' structures to make the
'action' key a TALES expression (e.g., "document_view" ->
"string:document_view").
Remaining TODOs:
- Write an external method for converting existing type info objects
(they all have dictionaries, instead of ActionInformation objects,
stored in the ZODB). Otherwise, all existing type info objects are
*toast*.
- Perhaps someone can think of a clever way to avoid the need for this
conversion?
=== CMF/CMFCore/tests/base/dummy.py 1.5 => 1.5.2.1 ===
--- CMF/CMFCore/tests/base/dummy.py:1.5 Thu Feb 13 02:44:49 2003
+++ CMF/CMFCore/tests/base/dummy.py Mon Mar 10 18:49:57 2003
@@ -2,7 +2,7 @@
from OFS.SimpleItem import Item
from Products.CMFCore.PortalContent import PortalContent
from Products.CMFCore.TypesTool import TypeInformation
-from Products.CMFCore.TypesTool import FactoryTypeInformation
+from Products.CMFCore.TypesTool import FactoryTypeInformation as FTI
from Products.CMFCore.ActionProviderBase import ActionProviderBase
class DummyObject(Implicit):
@@ -122,23 +122,25 @@
""" Dummy class of type info object """
meta_type = "Dummy Test Type Info"
-DummyFTI = FactoryTypeInformation( 'Dummy Content',
- title='Dummy Content Title',
- meta_type=DummyContent.meta_type,
- product='CMFDefault',
- factory='addDocument',
- actions= ( { 'name' : 'View',
- 'action' : 'view',
- 'permissions' : ('View', ) },
- { 'name' : 'View2',
- 'action' : 'view2',
- 'permissions' : ('View', ) },
- { 'name' : 'Edit',
- 'action' : 'edit',
- 'permissions' : ('forbidden permission',)
- }
- )
- )
+DummyFTI = FTI( 'Dummy Content'
+ , title='Dummy Content Title'
+ , meta_type=DummyContent.meta_type
+ , product='CMFDefault'
+ , factory='addDocument'
+ , actions= ( { 'name' : 'View'
+ , 'action' : 'string:view'
+ , 'permissions' : ( 'View', )
+ }
+ , { 'name' : 'View2'
+ , 'action' : 'string:view2'
+ , 'permissions' : ( 'View', )
+ }
+ , { 'name' : 'Edit'
+ , 'action' : 'string:edit'
+ , 'permissions' : ( 'forbidden permission',)
+ }
+ )
+ )
class DummyFolder( Implicit ):
"""