[CMF-checkins] CVS: CMF/CMFCore/tests/base - dummy.py:1.3.2.1
Tres Seaver
tseaver@zope.com
Sat, 6 Jul 2002 18:55:04 -0400
Update of /cvs-repository/CMF/CMFCore/tests/base
In directory cvs.zope.org:/tmp/cvs-serv14302/CMFCore/tests/base
Modified Files:
Tag: tseaver-typeinfo_as_apb-branch
dummy.py
Log Message:
- Check in initial pass at basing TypeInformation on ActionProviderBase
(and therefore removing old, stale implementation of type actions).
=== CMF/CMFCore/tests/base/dummy.py 1.3 => 1.3.2.1 ===
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):
@@ -121,23 +121,25 @@
""" Dummy class of type info object """
meta_type = "Dummy Test Type Info"
-DummyFTI = FactoryTypeInformation( 'Dummy',
- title='Dummy Content',
- 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'
+ , title='Dummy Content'
+ , 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 ):
"""