[CMF-checkins] CVS: Products/CMFCore/tests -
test_TypesTool.py:1.33.2.1
Yvo Schubbe
y.2004_ at wcm-solutions.de
Fri Sep 10 11:42:27 EDT 2004
Update of /cvs-repository/Products/CMFCore/tests
In directory cvs.zope.org:/tmp/cvs-serv26699/CMFCore/tests
Modified Files:
Tag: yuppie-post_1_5-cleanup-branch
test_TypesTool.py
Log Message:
- removed deprecated _getViewFor / getActionById machinery
=== Products/CMFCore/tests/test_TypesTool.py 1.33 => 1.33.2.1 ===
--- Products/CMFCore/tests/test_TypesTool.py:1.33 Tue Sep 7 04:48:38 2004
+++ Products/CMFCore/tests/test_TypesTool.py Fri Sep 10 11:41:57 2004
@@ -39,7 +39,6 @@
from Products.CMFCore.TypesTool import FactoryTypeInformation as FTI
from Products.CMFCore.TypesTool import ScriptableTypeInformation as STI
from Products.CMFCore.TypesTool import TypesTool
-from Products.CMFCore.utils import _getViewFor
class TypesToolTests(SecurityTest):
@@ -59,30 +58,6 @@
SecurityTest.tearDown(self)
- def test_processActions( self ):
- """
- Are the correct, permitted methods returned for actions?
- """
- site = self.site
- portal = site._setObject( 'portal', PortalFolder(id='portal') )
- portal.manage_addProduct = { 'FooProduct' : DummyFactory(portal) }
- portal.invokeFactory( 'Dummy Content', 'actions_dummy' )
- dummy = portal._getOb( 'actions_dummy' )
-
- # so we can traverse to it:
- dummy.view = DummyObject("view")
- dummy.view2 = DummyObject("view2")
- dummy.edit = DummyObject("edit")
-
- default_view = dummy()
- custom_view = _getViewFor( dummy, view='view2' )()
- unpermitted_view = _getViewFor( dummy, view='edit' )()
-
- self.failUnlessEqual(default_view, 'view')
- self.failUnlessEqual(custom_view, 'view2')
- self.failIf(unpermitted_view == 'edit')
- self.failUnlessEqual(unpermitted_view, 'view')
-
def test_allMetaTypes(self):
"""
Test that everything returned by allMetaTypes can be
@@ -242,30 +217,6 @@
self.failUnless( 'edit' in visible )
self.failUnless( 'objectproperties' in visible )
self.failIf( 'slot' in visible )
-
- def test_getActionById( self ):
- ti = self._makeInstance( 'Foo' )
- marker = []
- self.assertEqual( id( ti.getActionById( 'view', marker ) )
- , id( marker ) )
- self.assertRaises( ValueError, ti.getActionById, 'view' )
-
- ti = self._makeInstance( **FTIDATA_ACTIONS[0] )
- self.assertEqual( id( ti.getActionById( 'foo', marker ) )
- , id( marker ) )
- self.assertRaises( ValueError, ti.getActionById, 'foo' )
-
- action = ti.getActionById( 'view' )
- self.assertEqual( action, '' )
-
- action = ti.getActionById( 'edit' )
- self.assertEqual( action, 'foo_edit' )
-
- action = ti.getActionById( 'objectproperties' )
- self.assertEqual( action, 'foo_properties' )
-
- action = ti.getActionById( 'slot' )
- self.assertEqual( action, 'foo_slot' )
def test_MethodAliases_methods(self):
ti = self._makeInstance( **FTIDATA_CMF15[0] )
More information about the CMF-checkins
mailing list